net.elehack.gradle.science.ScienceExtension.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-science Show documentation
Show all versions of gradle-science Show documentation
Gradle tasks for scientific publication.
The newest version!
package net.elehack.gradle.science;
import org.gradle.api.Project
/**
* Extension for configuring the gradle-science tasks.
*
* @author Michael Ekstrand
*/
public class ScienceExtension {
/**
* The Pandoc executable.
*/
String pandoc
/**
* The Rscript executable.
*/
String rscript
/**
* A Zotero authentication key.
*/
String zoteroKey
ScienceExtension(Project prj) {
def prop = { String name, String dft ->
prj.hasProperty("science.$name") ? prj.getProperty("science.$name") : dft
}
pandoc = prop('pandoc', 'pandoc')
rscript = prop('rscript', 'Rscript')
}
}