#Andriod #Dev #Tip
#Performance #Optimization
java11 is compatible with java8, so you can set jvmTarget to 11 to reduce compatibility processing during compilation and improve compilation speed
build.gradle
allprojects {
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType(KotlinCompile).all {
kotlinOptions {
jvmTarget = "11"
}
}
}