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 processGoogleServices is never cached #58

Closed
davidvavra opened this issue Jun 4, 2019 · 5 comments
Closed

Gradle task processGoogleServices is never cached #58

davidvavra opened this issue Jun 4, 2019 · 5 comments

Comments

@davidvavra
Copy link

I tried to inspect my gradle build based on a tip from I/O talk: Run gradle build two times and see which tasks are not UP-TO-DATE. And I found the culprit: google-services-plugin.

I run ./gradlew assembleProdDebug two times without any changes and task :app:processProdDebugGoogleServices is not UP-TO-DATE. It causes other tasks down the road to execute again and it's slowing down every build.

Can google-services-plugin be made cacheable?

@lukaville
Copy link

@davidvavra
What other tasks it causes to execute again? Looks like GoogleServicesTask just generates XML files based on json files. Probably, there are no reasons to make it cacheable as unpacking/packing build cache artifacts will be more time-consuming. If GoogleServicesTask generates these XML files consistently then it should not break the cache for the next tasks because the input hash would be the same.

@davidvavra
Copy link
Author

davidvavra commented Jun 4, 2019

These tasks are run everytime (never UP-TO-DATE):

Task :app:processProdDebugGoogleServices
Task :app:fabricGenerateResourcesProdDebug
Task :app:generateProdDebugSources
Task :app:mergeProdDebugResources
Task :app:processProdDebugResources
Task :app:packageProdDebug
Task :app:assembleProdDebug

So it's not possible to check if json hasn't changed and if not, don't generate XML again?

@mgrzechocinski
Copy link

Seems like this is fixed in 4.3.0? After upgrading, I see that those tasks are finally marked as UP-TO-DATE by Gradle in a no-change build.

@hardysim
Copy link

hardysim commented Jul 5, 2019

Seems to be fixed with 4.3.0 for processGoogleServices but not for com.google.android.gms.oss.licenses.plugin.DependencyTask.

I've created a dedicated issue here: #68

@davidvavra
Copy link
Author

I confirm that 4.3.0 fixed it. Right now the problem is with :app:fabricGenerateResourcesProdDebug, but that's issue of Fabric. Closing this issue.

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

No branches or pull requests

4 participants