avast / gradle-docker-compose-plugin

Simplifies usage of Docker Compose for integration testing in Gradle environment.
MIT License
413 stars 96 forks source link

Gradle 8.2.1+ deprecation warning: "org.gradle.util.ConfigureUtil type has been deprecated. This is scheduled to be removed in Gradle 9.0." #409

Closed tkrah closed 1 year ago

tkrah commented 1 year ago
> Configure project :
The org.gradle.util.ConfigureUtil type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2.1/userguide/upgrading_version_8.html#org_gradle_util_reports_deprecations
        at build_b11m644jto6wmsgjkimcdqll4$_run_closure14.doCall(/home/tkrah/Development/src/git/testproject/main/build.gradle:335)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
        at build_b11m644jto6wmsgjkimcdqll4.run(/home/tkrah/Development/src/git/testproject/main/build.gradle:316)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)

The whole extension (L316) and each "logical" compose declaration (L335) are emitting those warnings in Gradle 8.2.1+.

See: https://github.com/avast/gradle-docker-compose-plugin/blob/5c67f607ee23087398124f16c9e66d78f61602f1/src/main/groovy/com/avast/gradle/dockercompose/ComposeExtension.groovy#L4

augi commented 1 year ago

Do you please have idea how to fix it? Any PR to address this issue would be really appreciated 🙏

tkrah commented 1 year ago

Unfortunately I am not familiar with the compose code here and have no time at the moment to understand the extension code to fix it - but maybe you can get some ideas from here:

https://github.com/gradle/gradle/issues/17446 https://github.com/spring-projects/spring-boot/pull/26903 https://github.com/spring-projects/spring-boot/commit/0f52bbc5607ad91fcd3fa2791b2130c5c0d4ee96

how to fix that. If I find time to have a closer look I'll provide a PR if possible.

The replacement docs also have this:

As a last resort, to apply some configuration represented by a Groovy Closure, a plugin can use {@link org.gradle.api.Project#configure(Object, Closure)}.

So maybe it's worth a try to use that.

@augi I tried it with that: https://github.com/avast/gradle-docker-compose-plugin/pull/413 - lets discuss stuff there.

augi commented 1 year ago

It should be resolved in 0.17.1.