Skip to content

StripGradleApiTask.isGradleApi also matches AGP #10

@gabrielittner

Description

@gabrielittner

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions