I wanted to add all of compileOnly to classpathConfiguration to get rid of R8 warnings about missing classes. However that fails with:
Could not determine the dependencies of task ':plugin:gr8StripGradleApi'.
> Failed to query the value of task ':plugin:gr8StripGradleApi' property 'gradleApiJar$plugin_common'.
> Collection contains more than one matching element.
When I printed all files in the configurationthe configuration I found this:
.../.gradle/caches/modules-2/files-2.1/dev.gradleplugins/gradle-api/8.0.2/81ef2cba43a0896316935ece786174490ea30758/gradle-api-8.0.2.jar
.../.gradle/caches/modules-2/files-2.1/com.android.tools.build/gradle-api/7.4.2/5f81693f719b0472898c69dafb42befbb18de887/gradle-api-7.4.2.jar
Not sure if this is possible to avoid just based on the path. Maybe it could be possible to have more than one classpathConfiguration and make it configurable which ones are stripped.
I wanted to add all of
compileOnlytoclasspathConfigurationto get rid of R8 warnings about missing classes. However that fails with:When I printed all files in the configurationthe configuration I found this:
Not sure if this is possible to avoid just based on the path. Maybe it could be possible to have more than one
classpathConfigurationand make it configurable which ones are stripped.