Skip to content

Instantly share code, notes, and snippets.

View kageiit's full-sized avatar

Gautam Korlam kageiit

View GitHub Profile
@kageiit
kageiit / Failure.log
Created October 11, 2016 18:18
Android gradle plugin failure
org.gradle.internal.event.ListenerNotificationException: Failed to notify build listener.
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:55)
at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:221)
at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:209)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy10.buildFinished(Unknown Source)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:103)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
at org.gradle.api.tasks.compile.JavaCompile.setDependencyCacheDir(JavaCompile.java:241)
at com.android.build.gradle.tasks.factory.AndroidJavaCompile_Decorated.setDependencyCacheDir(Unknown Source)
at com.android.build.gradle.tasks.factory.JavaCompileConfigAction.execute(JavaCompileConfigAction.java:130)
at com.android.build.gradle.tasks.factory.JavaCompileConfigAction.execute(JavaCompileConfigAction.java:35)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:142)
at com.android.build.gradle.internal.TaskContainerAdaptor.create(TaskContainerAdaptor.java:59)
at com.android.build.gradle.internal.scope.AndroidTaskRegistry.create(AndroidTaskRegistry.java:47)
at com.android.build.gradle.internal.scope.AndroidTaskRegistry.create(AndroidTaskRegistry.java:89)
at com.android.build.gradle.internal.TaskManager.createJavacTask(TaskManager.java:1130)
@kageiit
kageiit / resource_union.md
Last active November 21, 2017 18:05
Resource union

In the typical android build in Gradle, every module generates and compiles

  • A merged R.java file which contains the resource identifiers of all resources from the module and every other module/aar it depends on.
  • A copy of all the individual merged R.java of every module/aar it depends on. This is useful as a convenience when referring to resources in code. But this also comes with a significant cost as detailed below.

In buck, the same mechanism of resource merging is supported. Goal is to eliminate the expensive computation (copying, compilation) of all the individual merged R.java of every module/aar it depends on. Here’s why Consider below dependency tree for Android Libraries L1 - L7:

L4