Skip to content

Instantly share code, notes, and snippets.

@uklance
Created March 8, 2018 09:31
Show Gist options
  • Save uklance/5d8cc7bf2772321ee030ae627f44b561 to your computer and use it in GitHub Desktop.
Save uklance/5d8cc7bf2772321ee030ae627f44b561 to your computer and use it in GitHub Desktop.
Configuration depends on task
configurations {
myConfig
}
task addToMyConfig {
doLast {
println "Doing some work"
dependencies {
myConfig 'log4j:log4j:1.2.17'
}
}
}
task useMyConfig {
doLast {
println "myConfig = $configurations.myConfig.files"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment