# To prevent non-deterministic R8 issues, we set some flags. # The determinstic debugging one is self-explanatory, but also not as far-reaching as you'd hope. # The hashcode one uses a more determinstic hashcode (an incrementing counter). # Paired with the threadPoolSize=1 below, this should give us what we need. org.gradle.jvmargs=-Xmx12g -Xms256m -XX:MaxMetaspaceSize=1g -Dcom.android.tools.r8.deterministicdebugging=true -XX:+UnlockExperimentalVMOptions -XX:hashCode=3 android.r8.threadPoolSize=1 # Without this, the Kotlin compile daemon inherits -Xmx12g from org.gradle.jvmargs. kotlin.daemon.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m android.useAndroidX=true org.gradle.caching=true org.gradle.configuration-cache=true org.gradle.configuration-cache.problems=fail android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false android.experimental.enableScreenshotTest=true # We never want to use auto-provisioning, as it breaks reproducible builds. # This should not be a problem, because we never configure a "javaRepositories" # item to tell Gradle where to auto-provision the toolchain from, but adding # this flag adds an extra layer of protection. # See: https://docs.gradle.org/current/userguide/toolchains.html#sub:disable_auto_provision org.gradle.java.installations.auto-download=false # Required: Kotlin source files exist under src/testFixtures (e.g. core/ui). android.experimental.enableTestFixturesKotlinSupport=true # Required: app/build.gradle.kts uses kotlinExt.sourceSets.create(...) to wire Kotlin # source sets for Wire 5.x, which AGP 9.0's built-in Kotlin doesn't create automatically. android.disallowKotlinSourceSets=false # Uncomment these to build libsignal from source. # libsignalClientPath=../libsignal # org.gradle.dependency.verification=lenient