I have a class with more than 30 Packages and more than 200 Java Files(including all packages). Each time when i run the project in Android Studio, the Gradle in taking more or less around 10 to 13 minutes. I am using the Android Studio 2.1.2 and Gradle version 2.10. Regarding the dependencies i am using 26 dependencies(2 as project-compile project(':libproject'),13 as files-compile files('libs/httpmime-4.2.6.jar') and the rest like compile 'com.google.android.gms:play-services-location:8.3.0').
My Projects gradle file looks like this
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
jcenter()
}
}
I googled this and got a modified the app gradle file and it looks somwthing like this
defaultConfig {
applicationId "palmagent.Main.Three"
minSdkVersion 9
targetSdkVersion 23
multiDexEnabled true
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
jumboMode = true
}
My question is that whether the size of the project slows down the gradle or if there is someother issue?
Instant run helps but it gave up when generating signed APK.
I also wonder if my PC configuration is a reason. I am using Windows 8 PRO Intel Core(TM)2 Dup CPU 5 GB RAM 64 bit OS,x64 bassed Processor.
The same project when building in a PC with Linux generates APK faster.
Also I have 60 product flavors. So when generating the APK for each flavor i have to wait for 15 mins(only in windows) which makes this a big deal for me.
Please someone help me with a solution.