# GroovyRuntime

abstract class GroovyRuntime

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.

Content copied to clipboard

## Constructors

GroovyRuntime
Link copied to clipboard
constructor(project: Project)

## Functions

inferGroovyClasspath
Link copied to clipboard
open fun inferGroovyClasspath(classpath: Iterable<File>): FileCollection
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.