All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.elehack.gradle.science.ScienceExtension.groovy Maven / Gradle / Ivy

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')
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy