Files
Android/gradle.properties
2026-05-14 13:23:16 -04:00

30 lines
1.7 KiB
Properties

# R8 in AGP 9.x is non-deterministic, producing intermittent dex differences between
# otherwise-identical builds. Two flags work together to stabilize it:
# - -Dcom.android.tools.r8.threadCount=1 removes thread-scheduling-dependent ordering.
# - -XX:hashCode=3 (deterministic incrementing Object.identityHashCode) removes
# IdentityHashMap iteration-order non-determinism inside R8 (e.g. in
# KotlinClassMetadataReader, which decides whether to keep the Signature attribute
# on Kotlin generic lambda subclasses).
org.gradle.jvmargs=-Xmx12g -Xms256m -XX:MaxMetaspaceSize=1g -Dcom.android.tools.r8.threadCount=1 -XX:+UnlockExperimentalVMOptions -XX:hashCode=3
android.useAndroidX=true
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=fail
android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false
# 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