play-services-plugins icon indicating copy to clipboard operation
play-services-plugins copied to clipboard

Support for Configuration cache

Open ArcherEmiya05 opened this issue 3 years ago • 10 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

ArcherEmiya05 avatar Oct 03 '22 15:10 ArcherEmiya05

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

emartynov avatar Apr 04 '23 07:04 emartynov

Are there any plans for support here?

timothyfroehlich avatar May 05 '23 22:05 timothyfroehlich

For ones who need config cache support, you can migrate this plugin to Licensee, just ref https://github.com/LawnchairLauncher/lawnchair/pull/3492.

Originally posted by @Goooler in https://github.com/google/play-services-plugins/issues/206#issuecomment-1581992473

Goooler avatar Jun 08 '23 07:06 Goooler

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

TedaLIEz avatar Jul 11 '23 03:07 TedaLIEz

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

Goooler avatar Jul 11 '23 03:07 Goooler

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

Goooler avatar Jul 11 '23 04:07 Goooler