Gradle Object Instance: Difference between revisions
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
* [[Gradle_Concepts#The_Gradle_Object_Instance|Gradle Concepts]] | * [[Gradle_Concepts#The_Gradle_Object_Instance|Gradle Concepts]] | ||
=DEPLETE TO= | =DEPLETE TO= | ||
{{Org.gradle.api.invocation.Gradle|Org.gradle.api.invocation.Gradle}} | {{Internal|Org.gradle.api.invocation.Gradle|Org.gradle.api.invocation.Gradle}} | ||
=Overview= | =Overview= |
Latest revision as of 21:59, 11 October 2020
External
Internal
DEPLETE TO
Overview
TaskExecutionGraph
StartParameter
The StartParameter instance provides access to parsed command line arguments:
println "contains someTask? " + gradle.startParameter.taskNames.contains('someTask')
Gradle Version
The version of the Gradle runtime executing the build can be obtained from the Gradle object:
gradle.gradleVersion
Example:
jar {
// ...
manifest {
attributes (
// ...
'Built-With': "Gradle " + gradle.gradleVersion,
// ..
}
}
}