After switching to Java 8 (below are the newly added lines) for our Android project, Gradle build always gets stuck at :app:transformClassesWithDexBuilderForDebug
.
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
Please suggest how to reduce this build time. Before adding the above lines it was around 3 minutes most. Our gradle plugin version is 3.1.2
It takes even more than 30 minutes for every first build, after clean build / branch change / Android Studio restart