diff --git a/build-logic/gradle.properties b/build-logic/gradle.properties index 1c9073eb..2c1e59d9 100644 --- a/build-logic/gradle.properties +++ b/build-logic/gradle.properties @@ -1,4 +1,5 @@ -# Gradle properties are not passed to included builds https://github.com/gradle/gradle/issues/2534 org.gradle.parallel=true org.gradle.caching=true org.gradle.configureondemand=true +org.gradle.configuration-cache=true +org.gradle.configuration-cache.parallel=true \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 941f94ba..015d2f4a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +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=-Xmx4096m -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx4g -Xms4g + +# For more information about how Kotlin Daemon memory options were chosen: +# - Kotlin JVM args only inherit Xmx, ReservedCodeCache, and MaxMetaspace. Since we are specifying +# other args we need to specify all of them here. +# - We're using the Kotlin Gradle Plugin's default value for ReservedCodeCacheSize, if we do not then +# the Gradle JVM arg value for ReservedCodeCacheSize will be used. +kotlin.daemon.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=320m -XX:+HeapDumpOnOutOfMemoryError -Xmx4g -Xms4g + # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects @@ -20,8 +28,12 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true -org.gradle.parallel=true -org.gradle.daemon=true -org.gradle.unsafe.configuration-cache=false -android.nonFinalResIds=false \ No newline at end of file +org.gradle.configureondemand=false +org.gradle.caching=true +org.gradle.configuration-cache=true +org.gradle.configuration-cache.parallel=true +org.gradle.configuration-cache.problems=warn +# Disable build features that are enabled by default, +# https://developer.android.com/build/releases/gradle-plugin#default-changes +android.defaults.buildfeatures.resvalues=false +android.defaults.buildfeatures.shaders=false \ No newline at end of file