Change in behavior in Groovy 3.0.12

Clay Johnson <cjohnson-J5J7/[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CANXSgALqv_5Hqr-6-5JWuxD7zN-YKOq3QdiQWsUXhorLZWF2nQ@mail.gmail.com>
Hi all,

I'm trying to understand a change in behavior I see moving from Groovy
3.0.11 -> 3.0.12. Reproducer is here:
https://github.com/clayburn/Gradle7.6Issue

By default, this will build correctly against Groovy 3.0.11 if just running
`./gradlew assemble`. But if Groovy 3.0.12 is specified
(`./gradlew assemble -Dgroovy.version=3.0.12`), compilation fails to find
`com.android.ide.common.resources.AssetSet`.

If you look in Foo.groovy, you'll see a reference to
`MergeSourceSetFolders`, which is the class that imports `AssetSet`.
`AssetSet` comes from a runtime dependency on
`com.android.tools:sdk-common:30.0.4`. A couple of ways to work around this
change in behavior are to add this dependency to the compilation classpath
or to remove the `@CompileStatic` annotation. Is this expected with Groovy
3.0.12 and beyond, or is this a regression in behavior?

Thanks,

Clay Johnson
Senior Software Engineer
Gradle
W. gradle.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.