Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle task licenses.plugin.DependencyTask is never cached #68

Closed
hardysim opened this issue Jul 5, 2019 · 16 comments · Fixed by #169
Closed

Gradle task licenses.plugin.DependencyTask is never cached #68

hardysim opened this issue Jul 5, 2019 · 16 comments · Fixed by #169

Comments

@hardysim
Copy link

hardysim commented Jul 5, 2019

Just like #58 but for com.google.android.gms.oss.licenses.plugin.DependencyTask .

@hardysim
Copy link
Author

Using the new Build Analyzer in Android Studio 4.0 there's a warning for this as well. Here's the report:

At 11:23, Feb 26, 2020, Android Studio detected an issue with Gradle plugin com.google.android.gms.oss-licenses-plugin

Always-run Tasks
Task runs on every build because it declares no outputs.

Plugin: com.google.android.gms.oss-licenses-plugin
Task: getDependencies
Task type: com.google.android.gms.oss.licenses.plugin.DependencyTask
Issue detected in 1 module(s), total execution time was 0,045 s (6,4%), by module:
  Execution mode: FULL, time: 0,045 s (6,4%), determines build duration: false, on critical path: false

====Build information:====
Execution date: 26.02.2020 11:23
Total build duration: 1,945 s
Configuration time: 0,490 s (25,2%)
Critical path tasks time: 0,699 s (35,9%)
Critical path tasks size: 100
AGP versions: 4.0.0-beta01
====Platform information:====
AI-193.6494.35.40.6220182, JRE 1.8.0_212-release-1586-b04x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1080x1920, 2560x1440, 2560x1440

AS: 4.0 Beta 1; Kotlin plugin: 1.3.61; Android Gradle Plugin: 4.0.0-beta01; Gradle: 6.2; NDK: from local.properties: (not specified), latest from SDK: 21.0.6113669; LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: (not found)

@ubuntudroid
Copy link

Android Studio 4.0 beta1 screenshot of the behavior @hardysim is describing:

Screen Shot 2020-02-28 at 11 31 51

@alixwar
Copy link

alixwar commented Jun 1, 2020

Android Studio 4.0 (release) still complains:

At 13:18, Jun 01, 2020, Android Studio detected an issue with Gradle plugin com.google.android.gms.oss-licenses-plugin

Always-run Tasks
Task runs on every build because it declares no outputs.

Plugin: com.google.android.gms.oss-licenses-plugin
Task: getDependencies
Task type: com.google.android.gms.oss.licenses.plugin.DependencyTask
Issue detected in 1 module(s), total execution time was 0,103 s (4,4%), by module:
  Execution mode: FULL, time: 0,103 s (4,4%), determines build duration: true, on critical path: true

====Build information:====
Execution date: 2020-06-01 13:18
Total build duration: 2,899 s
Configuration time: 0,156 s (5,4%)
Critical path tasks time: 2,316 s (79,9%)
Critical path tasks size: 70
AGP versions:
====Platform information:====
AI-193.6911.18.40.6514223, JRE 1.8.0_242-release-1644-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080

AS: 4.0; Kotlin plugin: 1.3.72-release-Studio4.0-1; Android Gradle Plugin: 4.0.0; Gradle: 6.4.1; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)

@johnjohndoe
Copy link

I can confirm that as soon as you apply the com.google.android.gms:oss-licenses-plugin:0.10.2 plugin to a project then the com.google.android.gms.oss.licenses.plugin.DependencyTask will run on every build. I tested this with a new project created with Android Studio 4.2 Canary 2. Here is the build scan report which clearly shows the issue.

image

Just run ./gradlew assembleDebug --scan twice and take a look at the second build scan report.

Related

@johnjohndoe
Copy link

@runningcode Do you see how the task is misconfigured here?

@runningcode
Copy link

I'm going to guess that this is happening because the outputs are not declared properly. they are placed on groovy fields instead of on the groovy properties. A very subtle distinction. This PR will likely fix it:
https://github.com/google/play-services-plugins/pull/111/files

@johnjohndoe
Copy link

Nice. Thanks for pointing out the PR. I hope the maintainers will pick it up soon. @PaulRashidi

@PaulRashidi
Copy link
Collaborator

I actually transitioned to a new team a year and a half ago. I might suggest you split the PR into a no-op one (getter switches and such) and one that fixes the issue in this thread.

FYI, @caller9

@johnjohndoe
Copy link

@lptr Can you provide a stripped down PR as suggested by @PaulRashidi?

@lptr
Copy link

lptr commented Jun 22, 2020

Sorry, I'm lacking some context here. What PR are you asking me to do?

@johnjohndoe
Copy link

As far as I can tell your #111 PR contains the bugfix for the issue described here. I understand @PaulRashidi so that he would like to have a minimum PR only containing the bugfix.

@schuenadel
Copy link

I have created PR #152 to fix this issue in a minimal way. Could someone please check it?

@caller9
Copy link
Collaborator

caller9 commented Apr 5, 2021

https://github.com/google/play-services-plugins/releases/tag/oss-licenses-plugin-v0.10.3

@joezorry
Copy link

joezorry commented Oct 8, 2021

I'm guessing the support for cache is not the same thing as supporting configuration cache?
Would be nice to have support for configuration caching as well, even though it's an incubating feature at the moment, this is the one library holding us back from using it.

I honestly don't have the knowledge/time-to-learn to contribute myself at the moment.
Just would be nice :)

@runningcode
Copy link

@joezorry I think it would be a good idea to file a separate issue with the configuration cache issue you are seeing and include the html report as well as relevant version numbers.

@joezorry
Copy link

joezorry commented Oct 8, 2021

@runningcode great idea, I'll do that 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants