Created
March 8, 2018 09:31
-
-
Save uklance/5d8cc7bf2772321ee030ae627f44b561 to your computer and use it in GitHub Desktop.
Configuration depends on task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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