Gradle Build Script Classpath: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[Gradle Project#Build_Script_Classpath|Gradle Project]] | * [[Gradle Project#Build_Script_Classpath|Gradle Project]] | ||
* [[Extending_Gradle_with_a_Custom_Enhanced_Task#File-Based_Custom_Enhanced_Task|Extending Gradle with a Custom Enhanced Task]] | |||
=Overview= | =Overview= | ||
The build script classpath for a project can be configured with [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#buildscript-groovy.lang.Closure- Project.buildscript(Closure)] which corresponds to the "buildscript" [[build.gradle]] DSL element: | The build script classpath for a project can be configured with [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#buildscript-groovy.lang.Closure- Project.buildscript(Closure)] which corresponds to the "buildscript" [[build.gradle]] DSL element: | ||
Line 7: | Line 9: | ||
// configuration closure | // configuration closure | ||
repositories { | |||
mavenLocal() | |||
} | |||
dependencies { | |||
classpath 'playground.example:example:0.1.0' | |||
} | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 22:55, 11 October 2020
Internal
Overview
The build script classpath for a project can be configured with Project.buildscript(Closure) which corresponds to the "buildscript" build.gradle DSL element:
buildscript {
// configuration closure
repositories {
mavenLocal()
}
dependencies {
classpath 'playground.example:example:0.1.0'
}
}