diff --git a/gradle.properties b/gradle.properties index 27d3897..391de6f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,12 +6,15 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# Reference: https://github.com/android/nowinandroid/blob/main/gradle.properties +org.gradle.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx4g -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. For more details, visit +# Kotlin Daemon arguments with optimized GC settings +kotlin.daemon.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=320m -XX:+HeapDumpOnOutOfMemoryError -Xmx4g + +# Enable parallel execution # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects -# org.gradle.parallel=true +org.gradle.parallel=true # AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn @@ -30,6 +33,15 @@ android.nonTransitiveRClass=true # https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:configuration_on_demand org.gradle.caching=true +# Enable configuration caching +# https://docs.gradle.org/current/userguide/configuration_cache.html +org.gradle.configuration-cache=true +org.gradle.configuration-cache.parallel=true + # Enable Gradle's daemon mode, which is faster and more stable than the current # https://docs.gradle.org/current/userguide/gradle_daemon.html -org.gradle.daemon=true \ No newline at end of file +org.gradle.daemon=true + +# Disable unused build features +android.defaults.buildfeatures.resvalues=false +android.defaults.buildfeatures.shaders=false \ No newline at end of file