build: keep local verification runs from hijacking the desktop (#6370)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
James RichandClaude Fable 5 authored and GitHub committed 2026-07-22 12:44:13 -05:00
1 parent ae7c18d30c
commit 3c32ffa0d1
3 files changed
+17 -12

No files matched your search

@@ -94,6 +94,12 @@ internal fun Project.configureTestOptions() {
}
maxHeapSize = "2g"
// Keep forked test JVMs headless: Robolectric/Compose tests otherwise initialize
// AWT on macOS, spawning a Dock icon per fork and stealing window focus.
// apple.awt.UIElement covers anything that flips headless back off.
systemProperty("java.awt.headless", "true")
jvmArgs("-Dapple.awt.UIElement=true")
// JUnit Jupiter parallel execution within each Gradle fork.
// Classes run sequentially ("same_thread") because 19+ ViewModel test classes use
// Dispatchers.setMain() — a JVM-global singleton that races when classes execute
+4 -1
View File
@@ -21,6 +21,9 @@ ksp.project.isolation.enabled=true
org.gradle.caching=true
org.gradle.configuration-cache=true
org.gradle.isolated-projects=true
org.gradle.jvmargs=-Xmx8g -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication -XX:ReservedCodeCacheSize=512m -XX:MaxMetaspaceSize=2g -Xss2m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx8g -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication -XX:ReservedCodeCacheSize=512m -XX:MaxMetaspaceSize=2g -Xss2m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.awt.UIElement=true
org.gradle.parallel=true
# Run the daemon and its workers at low OS priority so full builds don't starve
# the foreground UI on developer laptops. Negligible on dedicated CI runners.
org.gradle.priority=low
org.gradle.welcome=never
+7 -11
View File
@@ -21,17 +21,13 @@ def getMeshProperty(String key) {
def currentDir = settingsDir
while (currentDir != null) {
def localFile = new File(currentDir, "local.properties")
if (localFile.exists()) {
def props = new Properties()
localFile.withInputStream { props.load(it) }
if (props.containsKey(key)) return props.getProperty(key)
}
def configFile = new File(currentDir, "config.properties")
if (configFile.exists()) {
def props = new Properties()
configFile.withInputStream { props.load(it) }
if (props.containsKey(key)) return props.getProperty(key)
for (name in ["local.properties", "config.properties", "secrets.properties"]) {
def file = new File(currentDir, name)
if (file.exists()) {
def props = new Properties()
file.withInputStream { props.load(it) }
if (props.containsKey(key)) return props.getProperty(key)
}
}
currentDir = currentDir.parentFile
}