My Stack post <http://stackoverflow.com/q/21125302/427763>

Using gradle 1.9-rc-3
When building with gradle on a multi-project setup containing roughly 140 
projects/libraries, the build time took 1 hour and 22 minutes. And i was 
using "--parallel". And our ANT build takes less than 20 minutes without 
parallel building.

Here is what i was initially doing:

./gradlew clean
> ./gradlew build --parallel
>

This took 1 hour and 22 minutes, roughly. I did a little testing it seems 
like the dexing is taking the longest amount of time. Is there a way to get 
the gradle process to re-use the stuff it has already dexed? If the 
libraries have already been built, it should re-use the already dexed 
libraries.

I saw the option --no-rebuild, but when i run with that option it says the 
following:

> File '/path/to/project/build/libs/project.aar' specified for property 
> 'bundle' does not exist.
>
> I replaced the path and the project name with generic stuff.

***

After some assistance i added "preDexLibraries = false" to all of my 
"build.gradle"  files. However, i still would like to know a centralize 
place that i can put that entry and it affect all the other "build.gradle" 
files. Because having to add that to all of the "build.gradle" files is 
annoying and if i ever have to remove it, it will be more annoying. This 
did not reduce the time to what we are needing.

After some more assistance, i ran "assembleDebug" instead of "build". This 
way it will only do debug builds instead of both release and debug. This 
still did not bring us down to the time we are getting with ANT. With all 
these changes we are only down to 58 minutes. And our ANT process is less 
than 20 minutes. Our ANT process is what android provides only modified to 
support large multi-project setups and to re-use dexed libraries. The dex 
process in the gradle process is taking 1+ minute for each project. It is 
by far the largest time consumer.

***

So, how can we speed the process up more? Is gradle re-using the dexed 
libraries after they have been dexed? What are your suggestions? For us to 
move over to gradle, it has to be able to compete with the ANT process.

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/groups/opt_out.

Reply via email to