question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Gradle Configuration Cache

See original GitHub issue

The google-services-plugin doesn’t support the upcoming Gradle’s configuration cache. Specifically with the new feature, plugins are not supposed to register build listeners.

Here the stacktace:

org.gradle.api.InvalidUserCodeException: Listener registration 'Gradle.addListener' by build 'my-project' is unsupported.
	at org.gradle.instantexecution.initialization.DefaultInstantExecutionProblemsListener.onBuildScopeListenerRegistration(InstantExecutionProblemsListener.kt:88)
	at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:398)
	at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:380)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
	at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:368)
	at org.gradle.internal.event.DefaultListenerManager$EventBroadcast.dispatch(DefaultListenerManager.java:179)
	at org.gradle.internal.event.DefaultListenerManager$EventBroadcast.dispatch(DefaultListenerManager.java:153)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at com.sun.proxy.$Proxy22.onBuildScopeListenerRegistration(Unknown Source)
	at org.gradle.invocation.DefaultGradle.notifyListenerRegistration(DefaultGradle.java:394)
	at org.gradle.invocation.DefaultGradle.addListener(DefaultGradle.java:388)
	at org.gradle.invocation.DefaultGradle.addListener(DefaultGradle.java:384)
	at org.gradle.api.invocation.Gradle$addListener.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
	at com.google.gms.googleservices.GoogleServicesPlugin$_apply_closure1.doCall(GoogleServicesPlugin.groovy:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
//omitted as not relevant

To Reproduce

  1. Create an android project
  2. Apply the Android Gradle Plugin 4.1 beta
  3. use Gradle 6.6-milestone-3
  4. Run ./gradlew --configuration-cache help

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:22
  • Comments:12

github_iconTop GitHub Comments

6reactions
ZacSweerscommented, Aug 8, 2020

A workaround at least is to disable dependency analysis (which I think should be the default anyway, but that’s another discussion)

googleServices { disableVersionCheck = true }
1reaction
Worencommented, Aug 19, 2021

@gavra0 or @davidmotson - Any update on the release of version 1.2.3? Thanks We’re also using strict-version-matcher-plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration cache - Gradle User Manual
The configuration cache takes care of caching the build configuration for a particular set of tasks. In other words, the configuration cache saves...
Read more >
Gradle Configuration Caching — Replacing ... - ProAndroidDev
Gradle recently rolled out a new feature called the “configuration cache” aimed at “significantly improving build performance by caching the result of the ......
Read more >
How to I enable Gradle configuration cache feature persistently?
The configuration cache takes care of caching the build configuration for a particular set of tasks. In other words, the configuration cache ......
Read more >
Gradle Configuration Caching — Replacing a Build ... - Droidcon
Gradle recently rolled out a new feature called the “configuration cache” aimed at “significantly improving build performance by caching the ...
Read more >
Configuration caching deep dive - Medium
gradle /configuration-cache directory ). It is able to serialize all Gradle-managed types (e.g. FileCollection , Property , Provider ) and all ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found