Skip to content

Instantly share code, notes, and snippets.

@Ithildir
Created November 16, 2015 19:35
Show Gist options
  • Save Ithildir/91e7efff0f673aa7c853 to your computer and use it in GitHub Desktop.
Save Ithildir/91e7efff0f673aa7c853 to your computer and use it in GitHub Desktop.
Add a task to a Gradle multi-project build via init-script
// Call with gradlew --init-script=S:/temp/netbeans.gradle printDependencies
allprojects {
task printDependencies << {
["runtime", "testIntegrationRuntime"].each {
Configuration configuration = configurations.findByName it
if (configuration) {
configuration.files.each {
println it
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment