Skip to content

Instantly share code, notes, and snippets.

@kevinah95
Last active October 31, 2025 00:53
Show Gist options
  • Save kevinah95/664b43d1e469dd7d5661c6828411ba31 to your computer and use it in GitHub Desktop.
Save kevinah95/664b43d1e469dd7d5661c6828411ba31 to your computer and use it in GitHub Desktop.
KMP Optimization
#Kotlin
#Ref: https://kotlinlang.org/docs/native-improving-compilation-time.html#try-incremental-compilation-of-klib-artifacts
kotlin.incremental.native=true
#Gradle
#Ref: https://touchlab.co/optimizing-gradle-builds-in-Multi-module-projects#enable-gradle-parallel-execution
org.gradle.parallel=true
#Android
#If all dependencies are on AndroidX, we can safely disable Jetifier to improve build performance.
android.enableJetifier=false
@kevinah95
Copy link
Author

kevinah95 commented Oct 31, 2025

I think that we can use lastest java LTS (Long-Term Support) to imrpove performance. Need more investigation.

compileOptions {
    sourceCompatibility = JavaVersion.VERSION_21
    targetCompatibility = JavaVersion.VERSION_21
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment