Here is a small example project where the same behaviour can be seen: https://github.com/cagricakir/FirstTraining/ Change the build.gradle to use gradle plugin 0.9.+, build tools 19.0.3 and add the dexOptions to turn incremental dexing on. Also change the gradle-wrapper.properties to use gradle 1.11.
With this setup, make a one line change to MainActivity.java and run ./gradlew --daemon --parallel --offline --info assembleDebug It can be seen that the incremental flag isn't used when dexing, with similar output as when run on my own project On Wednesday, March 19, 2014 3:03:27 PM UTC-4, [email protected] wrote: > > I put that in the build.gradle of my main project and I still get the same > output (i.e. no incremental flag when dexing). The build also takes the > same amount of time so it didn't seem to have an effect > > On Wednesday, March 19, 2014 2:48:52 PM UTC-4, Xavier Ducrohet wrote: >> >> hmm looking at this I discovered that it's turn off by default! >> >> Try with >> >> android { >> dexOptions { >> incremental true >> } >> } >> >> >> On Wed, Mar 19, 2014 at 11:26 AM, <[email protected]> wrote: >> >>> Here is the relevant part of the output from the command ./gradlew >>> --parallel --daemon --offline --info assembleProductionDebug >>> >>> :MyProject:preDexProductionDebug (Thread[Task worker Thread 2,5,main]) >>> started. >>> :MyProject:preDexProductionDebug >>> Skipping task ':MyProject:preDexProductionDebug' as it is up-to-date >>> (took 0.0050 secs). >>> :MyProject:preDexProductionDebug UP-TO-DATE >>> :MyProject:preDexProductionDebug (Thread[Task worker Thread 2,5,main]) >>> completed. Took 0.0070 secs. >>> :MyProject:dexProductionDebug (Thread[Task worker Thread 2,5,main]) >>> started. >>> :MyProject:dexProductionDebug >>> Executing task ':MyProject:dexProductionDebug' (up-to-date check took >>> 0.089 secs) due to: >>> Input file >>> /Users/me/Documents/workspace/Android/MyProject/build/classes/production/debug/com/projectname/models/Language.class >>> >>> has changed. >>> command: /Applications/Android Studio.app/sdk/build-tools/19.0.1/dx >>> --dex --output >>> /Users/me/Documents/workspace/Android/MyProject/build/dex/production/debug >>> /Users/me/Documents/workspace/Android/MyProject/build/classes/production/debug >>> >>> /Users/me/Documents/workspace/Android/MyProject/build/dependency-cache/production/debug >>> >>> /Users/me/Documents/workspace/Android/MyProject/build/pre-dexed/production/debug/android-agent-2.444.0-9cb8d30d445e9cf76dfafa72c76262831b460938.jar >>> (and 25 more jars after) >>> >>> Language.java was the file I made the change to and I can see from the >>> output that Language.class changed. But it doesn't seem like any jars >>> changed >>> >>> On Wednesday, March 19, 2014 11:48:33 AM UTC-4, Xavier Ducrohet wrote: >>> >>>> If you run from the command line with --info it should tell you what >>>> changed. Can you check if you see that it's not using incremental and yet >>>> no jar files changed? >>>> >>>> >>>> On Wed, Mar 19, 2014 at 7:44 AM, <[email protected]> wrote: >>>> >>>>> Is there any way to tell which jar has changed that would cause this >>>>> to happen? I'm only changing code in my main project which I would think >>>>> wouldn't cause this to happen >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "adt-dev" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>>> >>>> -- >>>> Xavier Ducrohet >>>> Android SDK Tech Lead >>>> Google Inc. >>>> http://developer.android.com | http://tools.android.com >>>> >>>> Please do not send me questions directly. Thanks! >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "adt-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Xavier Ducrohet >> Android SDK Tech Lead >> Google Inc. >> http://developer.android.com | http://tools.android.com >> >> Please do not send me questions directly. Thanks! >> > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
