For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

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.

Since

1.6

Constructors

Link copied to clipboard
constructor(project: Project)
Creates a new GroovyRuntime.

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.