Skip to content

[Bug]: Configuration Cache is breaking because of Google's OSS Licenses plugin #2031

@SimonMarquis

Description

@SimonMarquis

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

What happened?

Google's OSS Licenses plugin flags its task as notCompatibleWithConfigurationCache() (not sure why but it has almost always been that way):

https://github.com/google/play-services-plugins/blob/221054395faf95cae5c77a6f1f3446f8b6cbfb2d/oss-licenses-plugin/src/main/groovy/com/google/android/gms/oss/licenses/plugin/OssLicensesPlugin.groovy#L56

Unfortunately, this means the entire configuration cache is discarded on each build that triggers it (e.g. local builds of the :app module).

You can see here an example of it: https://youtu.be/JFmGwHrIt84?t=1011 (👋 @ljacomet) and the task being listed at 19min 32s in the video.

I'll open a PR to only apply this plugin on CI builds where configuration cache is not relevant yet.


Also, fwiw this plugin is currently quite broken as it does not respect edge-to-edge, and does not seem to be taken very seriously :/ long standing issues not being acknowledged or actively worked on:

@dturner would you be open to a lib migration to something more actively maintained?
I'm looking at cashapp/licensee, which has been already mentionned here:

This would require a bit of code for the display part, but it would allow this project to be:

  • configuration-cache compatible
  • Proper light/dark theme support based on the app state
  • Compose UI (and extensible, it would not be hard to make something cleaner than what the plugin does at this time)
  • Validation task on third party licenses (similar in spirit to what we do with the badging process for the manifest and dependency-guard for the dependencies)

Here is what it could look like (PR in one of my project where I did the migration a while ago)

🌑 ☀️
image image

Relevant logcat output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions