Skip to content

Support for Configuration cache #246

Closed

Description

@ArcherEmiya05

Describe the bug
Build Analyzer is giving a warning that the build can be optimize with Configuration cache but it says that this library does not support it.

To Reproduce
Steps to reproduce the behavior:
0. Use Android Studio Flamingo | 2022.2.1 Canary 2 with AGP version 8.0.0-alpha02

  1. Create project
  2. Add oss-licenses plugin
  3. Build project
  4. See Build Analyzer

Expected behavior
Support Configuration cache to optimize build time

Screenshots
image

image

Desktop (please complete the following information):

  • Gradle version: 7.5
  • Android Studio version [e.g. 3.1 (stable)]: Android Studio Flamingo | 2022.2.1 Canary 2
  • Plugin name and version [e.g. OSS Licenses 16.0.0]: 17.0.0

Activity

  1. emartynov commented on Apr 4, 2023

    @emartynov

    We enabled the configuration cache, but it was discarded because an incompatible task debugOssLicensesTaskwas found.

    It looks like only because of this line https://github.com/google/play-services-plugins/blob/master/oss-licenses-plugin/src/main/groovy/com/google/android/gms/oss/licenses/plugin/LicensesTask.groovy#L235

  2. timothyfroehlich commented on May 5, 2023

    @timothyfroehlich
    Member

    Are there any plans for support here?

  3. Goooler commented on Jun 8, 2023

    @Goooler

    For ones who need config cache support, you can migrate this plugin to Licensee, just ref LawnchairLauncher/lawnchair#3492.

    Originally posted by @Goooler in #206 (comment)

  4. TedaLIEz commented on Jul 11, 2023

    @TedaLIEz

    @Goooler does Licensee provide the same functionality as the oss-licenses-plugin here? BTW +1 for this request, it's a waste of time for us to configure our gradle project repeatedly, especially in local build.

  5. Goooler commented on Jul 11, 2023

    @Goooler

    No OssLicensesMenuActivity, but with the artifacts.json, just ref my PR to migrate the plugin.

  6. Goooler commented on Jul 11, 2023

    @Goooler

    Actually, the CC compatibility issue had been finished in #242, but just marked related tasks notCompatibleWithConfigurationCache .

  7. added
    oss-licenses
    on Apr 11, 2024
  8. ganadist commented on Mar 17, 2025

    @ganadist

    Since Gradle 10.0, configuration cache will be enabled as default.

  9. ganadist commented on Mar 19, 2025

    @ganadist

    It looks plugin should use https://developer.android.com/reference/tools/gradle-api/8.9/com/android/build/api/variant/ApplicationVariant?hl=en instead of com.android.build.gradle.api.BaseVariant

  10. Goooler commented on Mar 21, 2025

    @Goooler

    There is an easy way to bundle the artifacts.json for you, see https://github.com/cashapp/licensee/releases/tag/1.13.0.

    Originally posted by @Goooler in #206

  11. syslogic commented on Dec 5, 2025

    @syslogic

    There still seems to be a task-dependency missing #327.
    It will complain unless configuring the generated tasks.

    tasks.withType<DependencyTask>().configureEach {
        val taskName = name.replace("DependencyTask", "LicensesCleanUpTask")
        if (project.tasks.findByName(taskName) != null) {dependsOn(taskName)}
    }
    
  12. timothyfroehlich commented on Mar 12, 2026

    @timothyfroehlich
    Member

    This is (finally) fixed in main and will be released as v0.11.0 early next week. I now work on the team that owns the plugin so I finally got to fix it :)

    If there are any issues with the new release, please file a new issue, I'll be monitoring them.

  13. argenkiwi commented on Mar 17, 2026

    @argenkiwi

    I am a bit confused about the release process. I can see v0.11.0 on my GitHub feed, but if I update my project's dependencies it is nowhere to be found. What is the best way to know when the release has finally been published?

  14. SimonMarquis commented on Mar 18, 2026

    @SimonMarquis
  15. timothyfroehlich commented on Mar 18, 2026

    @timothyfroehlich
    Member

    Hi, I'm sorry, the release goes through another team's release process and at the time I posted I hadn't realized that they release on Thursdays (and had just missed the window last Thursday). You can follow #389, and there's instructions there for manually trying out the plugin from main.

  16. timothyfroehlich commented on Mar 19, 2026

    @timothyfroehlich
    Member

    It's been released! I'm closing this issue, if there are any new problems, please open new issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

oss-licenses

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions