Releases: avast/gradle-docker-compose-plugin
isRequiredBy fixed for TaskProvider and classes task
There is an optimization that ensures that classes
task is executed before composeUp
(so it's active for Java projects only). There was an issue because TaskProvider.configure()
was called from another configure
method, and we didn't know that this is not allowed.
This is fixed and also this use-case is now also covered by tests.
Issue with output capturing in Gradle 6 fixed
Gradle 6 warnings eliminated
0.10.2 Bintray upload fixed (missing pom.xml)
isRequiredBy now supports also TaskProvider (instead of Task)
0.10.1 isRequiredBy overload accepting TaskProvider instead of Task Fixes #208
Task Configuration Avoidance API used
This release requires Gradle 4.9 or higher because it uses Task Configuration Avoidance feature that improves build times when some of the tasks are not actually used.
forceRecreate behavior changed
Also --renew-anon-volumes
switch is added to docker-compose up
command.
includeDependencies parameter
A new parameter includeDependencies
introduced (as requested in #190). This release also removes removeDependents
parameter - use includeDependencies
instead.
Daemon thread interrupted after build
This change should fix #188
removeDependents option added
It allows to remove also services that are not explicitly started (but are defined as dependencies of the started ones).
Compatibility fix for Gradle 4.x
Fixes incompatibility with Gradle 4.x introduced in 0.9.0
release.
Implementation details
The plugin uses @Immutable
annotation that generates a code that uses ImmutableASTTransformation
class from Groovy library.
When compiling for Gradle 5+ (so Groovy 2.5+) then the generated code uses a new method that was added in Groovy 2.5. Therefore this method is not available in Groovy 2.4, so in Gradle 4.x. You can observe errors like this:
Execution failed for task ':composeUp'. groovy.lang.MissingMethodException: No signature of method: static org.codehaus.groovy.transform.ImmutableASTTransformation.checkImmutable() is applicable for argument types: (java.lang.Class, java.lang.String, com.avast.gradle.dockercompose.ServiceHostType, java.util.ArrayList, java.util.ArrayList) values: [class com.avast.gradle.dockercompose.ServiceHost, type, NetworkGateway, ...]
Possible solutions: checkImmutable(java.lang.Class, java.lang.String, java.lang.Object), checkImmutable(java.lang.String, java.lang.String, java.lang.Object)
So we disabled the @Immutable
annotations because we want to support also Gradle 4.x users.
We could uncomment them if one of these conditions were met:
- Groovy of the latest Gradle fixes this forward compatibility.
- There is almost no users of Gradle 4.x.