As we are hitting the dreaded method count limit we are forced to use Proguard during development to compile and dex our code with gradle. Although Proguard does its job pretty well and deploying the app works now, code changes doesn't seem to get picked up any more.
It always builds and deploys the very first build after having enabled Proguard for the first time. The only workaround is doing a clean (i.e. executing the gradle clean task) before building. Then all changes are picked up. However cleaning and doing a full build takes about 5 minutes, so this is no real alternative. Andriod Gradle Plugin is at version 0.9.2.
I couldn't find anything regarding this problem, so maybe someone here can help us.
EDIT: Strange thing is, that the compileDebugJava task is actually executed as the changes are detected, but they somehow don't land in the resulting APK:
Executing task ':MyApp:compileDebugJava' (up-to-date check took 0.03 secs) due to:
Input file /Users/ubuntudroid/projects/git/myapp/code/MyApp/build/exploded-aar/code/CoreLib/unspecified/classes.jar has changed.
Compiling with JDK Java compiler API.
:MyApp:compileDebugJava (Thread[Daemon,5,main]) completed. Took 0.529 secs.
:MyApp:proguardDebug (Thread[Daemon,5,main]) started.
:MyApp:proguardDebug
Skipping task ':MyApp:proguardDebug' as it is up-to-date (took 0.011 secs).
:MyApp:proguardDebug UP-TO-DATE
:MyApp:proguardDebug (Thread[Daemon,5,main]) completed. Took 0.013 secs.
:MyApp:dexDebug (Thread[Daemon,5,main]) started.
:MyApp:dexDebug
Skipping task ':MyApp:dexDebug' as it is up-to-date (took 0.0010 secs).
:MyApp:dexDebug UP-TO-DATE
:MyApp:dexDebug (Thread[Daemon,5,main]) completed. Took 0.0030 secs.
I think this is due to the proguardDebug
task which is not executed and which eventually prevents the dexDebug
task from running as the optimized code resulting from the proguardDebug
task is taken from the cache. But why is the proguardDebug
task already up-to-date?