Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / games / hub / build.gradle.kts
build.gradle.kts74 lines · 3.3 KiBRaw
| 1 | plugins { |
| 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:hub:metadata` task name either way. |
| 5 | id("common-conventions-preview-metadata") |
| 6 | } |
| 7 | |
| 8 | launcherIcon { |
| 9 | symbol = "stadia_controller" |
| 10 | } |
| 11 | |
| 12 | android { |
| 13 | defaultConfig { |
| 14 | applicationId = "com.vayunmathur.games.hub" |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | // This module has no rustNativeLib of its own: the native load arrives |
| 19 | // transitively from :library:avatar (libyuu_avatar via YuuAvatarNative) and |
| 20 | // :library:e2ee-p2p, which is what puts this module's tests on the |
| 21 | // forkEvery = 1 path at all. Only the classes below actually load a native |
| 22 | // library: they compose YuuEditorScreen, whose preview composes |
| 23 | // YuuAvatar3D — the component that reads YuuAvatarNative.isAvailable |
| 24 | // (NativeLoader.load("yuu_avatar")) before any surface work. Quarantine |
| 25 | // those loaders into testDevUnitTestNative (forkEvery = 1); the remaining |
| 26 | // classes batch 20-per-JVM in testDevUnitTest, which depends on the |
| 27 | // quarantine task so the usual invocation still runs everything. |
| 28 | rustNativeTests { |
| 29 | nativeClasses.addAll( |
| 30 | listOf( |
| 31 | "com.vayunmathur.games.hub.ui.HubCoveragePassTest", |
| 32 | "com.vayunmathur.games.hub.ui.HubYuuEditorCoverageTest", |
| 33 | "com.vayunmathur.games.hub.ui.HubYuuEditorPass3Test", |
| 34 | ) |
| 35 | ) |
| 36 | // Shared-JVM polluters keep forkEvery = 1 in the same companion task: |
| 37 | // every class below but PlayOnTvSessionTest builds GameHubViewModel |
| 38 | // and/or GamesHubRepository.get — the process-wide repository |
| 39 | // singleton whose Room db is cached on first access, fed by each |
| 40 | // class's own static sharedDb swapped into the process-wide |
| 41 | // `databases` map; the VM's viewModelScope stateIn flows collect the |
| 42 | // repository for its lifetime. HubPagesCoverageTest and |
| 43 | // HubScreensPass3Test also compose Yuu screens (native, above), but |
| 44 | // their repository/VM pollution is the batch-breaking hazard. |
| 45 | // PlayOnTvSessionTest persists its sender id in the process-wide |
| 46 | // "hub_controller" preferencesDataStore and expects the second |
| 47 | // session to reuse it. All other classes batch. |
| 48 | isolatedClasses.addAll( |
| 49 | listOf( |
| 50 | "com.vayunmathur.games.hub.data.HubStoresAndViewModelTest", |
| 51 | "com.vayunmathur.games.hub.network.PlayOnTvSessionTest", |
| 52 | "com.vayunmathur.games.hub.provider.HubConvertersMoreTest", |
| 53 | "com.vayunmathur.games.hub.provider.HubProviderTest", |
| 54 | "com.vayunmathur.games.hub.ui.HubNavigationCoverageTest", |
| 55 | "com.vayunmathur.games.hub.ui.HubPagesCoverageTest", |
| 56 | "com.vayunmathur.games.hub.ui.HubScreensPass3Test", |
| 57 | ) |
| 58 | ) |
| 59 | } |
| 60 | |
| 61 | dependencies { |
| 62 | implementation(project(":library")) |
| 63 | implementation(project(":library:format")) |
| 64 | implementation(project(":library:ui")) |
| 65 | implementation(project(":library:room")) |
| 66 | implementation(project(":library:avatar")) |
| 67 | implementation(project(":sdk:games")) |
| 68 | // "Play on TV": the generic phone-as-controller SDK (pad UI + discovery + |
| 69 | // client) plus PQC sealing for the handshake's session secret. |
| 70 | implementation(project(":sdk:controller")) |
| 71 | implementation(project(":library:e2ee-p2p")) |
| 72 | implementation(libs.androidx.datastore.preferences) |
| 73 | implementRoom(libs) |
| 74 | } |