Gradle Build Script Classpath: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Gradle Project =Overview=")
 
 
(2 intermediate revisions 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:
<syntaxhighlight lang='groovy'>
buildscript {
  // configuration closure
  repositories {
    mavenLocal()
  }
 
  dependencies {
    classpath 'playground.example:example:0.1.0'
  }
}
</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'
  }
}