google/play-services-plugins

Support for Configuration cache

ArcherEmiya05 opened this issue · 6 comments

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

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

Are there any plans for support here?

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)

@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.

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

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