Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / games / arrows / build.gradle.kts

build.gradle.kts43 lines · 1.6 KiBRaw
1plugins {
2 id("common-conventions-app")
3 // Listing screenshots come from Compose previews (src/screenshotTest), not from an
4 // instrumented test on a device. Same `:games:arrows:metadata` task name either way.
5 id("common-conventions-preview-metadata")
6}
7
8launcherIcon {
9 symbol = "double_arrow"
10}
11
12android {
13 defaultConfig {
14 applicationId = "com.vayunmathur.games.arrows"
15 }
16}
17
18dependencies {
19 implementation(project(":sdk:games"))
20 implementation(project(":library:work"))
21 implementation(libs.androidx.datastore.preferences)
22}
23
24// Per-class JVM isolation for unit tests, overriding the shared
25// non-Rust batching (forkEvery = 20 in build-logic's RustNative.kt).
26// Proven pollution, not a precaution: every class here drives the
27// process-wide "settings" preferences DataStore, and classes are
28// batched into one JVM per Gradle fork. ArrowsViewModelTest passes
29// alone on taskset -c 0-4 and passes batched with its DataStore /
30// Pages / Achievements neighbours, but in the full module batch a
31// neighbour's leftover store state and actors leave its board won
32// or its next-level load starved (CI run 200d0e1f, and reproduced
33// locally under the same taskset shape). The ViewModel test classes
34// already clear every ViewModel they create; what they cannot clear
35// is another class's actors in the shared sandbox. One JVM per class
36// makes the store each class sees its own. (Registered in
37// afterEvaluate so it runs after the convention plugin's own
38// afterEvaluate batching and wins.)
39afterEvaluate {
40 tasks.withType<org.gradle.api.tasks.testing.Test>().configureEach {
41 forkEvery = 1
42 }
43}