gradle-docker
gradle-docker copied to clipboard
dockerTag tasks shouldn't be created in afterEvaluate closure
This means that I can't set up dependencies in the body of my gradle files, like this benign example:
integTest.dependsOn dockerTagLatest
Complains with:
* Where:
Build file '/Users/dfox/my-project/my-project/my-project.gradle' line: 16
* What went wrong:
A problem occurred evaluating project ':my-project'.
> Could not get unknown property 'dockerTagLatest' for project ':my-project' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
Want to make a PR?
Actually I think you can if you use a closure:
integTest.dependsOn { dockerTagLatest }
That being said, it would be more comfortable to have the tasks defined before afterEvaluate.
You can do dependsOn 'dockerTagLatest' ;)