unbroken-dome / gradle-testsets-plugin

A plugin for the Gradle build system that allows specifying test sets (like integration or acceptance tests).
MIT License
230 stars 50 forks source link

fix gradle 9 deprecations #130

Closed abendt closed 1 year ago

abendt commented 2 years ago

usage of ConfigureUtil is deprecated and about to be removed in gradle 8: https://docs.gradle.org/current/javadoc/org/gradle/util/ConfigureUtil.html

this PR removes usages of the class. it also adds some tests to ensure that the groovy dsl still works as the functions that accept closure were removed from TestSetContainer.

when using gradle 7.6:

$ gw --warning-mode all --stacktrace
Configuration on demand is an incubating feature.

> Configure project :app
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/7.6/userguide/upgrading_version_7.html#org_gradle_util_reports_deprecations
        at org.gradle.util.ConfigureUtil.logDeprecation(ConfigureUtil.java:216)
        at org.gradle.util.ConfigureUtil.configureUsing(ConfigureUtil.java:167)
        at org.unbrokendome.gradle.plugins.testsets.util.ClosureExtensionsKt.toAction(ClosureExtensions.kt:9)
        at org.unbrokendome.gradle.plugins.testsets.dsl.DefaultTestSetContainer.create(TestSetContainer.kt:192)
        at org.unbrokendome.gradle.plugins.testsets.dsl.DefaultTestSetContainer.create(TestSetContainer.kt:161)