GroovyRuntime

abstract class GroovyRuntime(source)

Provides information related to the Groovy runtime(s) used in a project. Added by the org.gradle.api.plugins.GroovyBasePlugin as a project extension named groovyRuntime.

Example usage:

    plugins {
        id 'groovy'
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        implementation "org.codehaus.groovy:groovy-all:2.1.2"
    }

    def groovyClasspath = groovyRuntime.inferGroovyClasspath(configurations.compileClasspath)
    // The returned class path can be used to configure the 'groovyClasspath' property of tasks
    // such as 'GroovyCompile' or 'Groovydoc', or to execute these and other Groovy tools directly.

Constructors

Link copied to clipboard
constructor(project: Project)

Functions

Link copied to clipboard
Searches the specified class path for Groovy Jars (groovy(-indy), groovy-all(-indy)) and returns a corresponding class path for executing Groovy tools such as the Groovy compiler and Groovydoc tool.