Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / backup / build.gradle.kts
build.gradle.kts67 lines · 3.0 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 `:backup:metadata` task name either way. |
| 5 | id("common-conventions-preview-metadata") |
| 6 | } |
| 7 | |
| 8 | launcherIcon { |
| 9 | symbol = "backup" |
| 10 | } |
| 11 | |
| 12 | android { |
| 13 | defaultConfig { |
| 14 | applicationId = "com.vayunmathur.backup" |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | // This module registers no Rust library of its own; it only inherits |
| 19 | // forkEvery = 1 because :library:e2ee-p2p (implementation dep below) |
| 20 | // registers libe2ee_pqc. No backup test actually loads that library: |
| 21 | // backup's crypto path is E2ee's pure-JCE AES-GCM plus the pure-JCE |
| 22 | // Hkdf, and nothing here references Pqc/PqcNative. So there are no |
| 23 | // nativeClasses — the quarantine below exists purely for the shared-JVM |
| 24 | // polluters. Quarantine them into testDevUnitTestNative |
| 25 | // (forkEvery = 1); the remaining classes batch 20-per-JVM in |
| 26 | // testDevUnitTest, which depends on the quarantine task so the usual |
| 27 | // invocation still runs everything. |
| 28 | rustNativeTests { |
| 29 | // Shared-JVM polluters keep forkEvery = 1 in the companion task: |
| 30 | // BackupConfig is the module's only DataStore owner, and |
| 31 | // BackupViewModel collects its settings flow in viewModelScope |
| 32 | // forever (BackupViewModelTest itself documents that a leaked VM |
| 33 | // deadlocks a later runBlocking DataStore edit on the paused main |
| 34 | // looper); persisted DataStore state also leaks into classes |
| 35 | // expecting defaults. Audit rule: any test instantiating |
| 36 | // BackupViewModel or using BackupConfig directly belongs here. |
| 37 | // All other classes batch. |
| 38 | isolatedClasses.addAll( |
| 39 | listOf( |
| 40 | "com.vayunmathur.backup.NavigationAndRouteTest", |
| 41 | "com.vayunmathur.backup.data.BackupConfigTest", |
| 42 | "com.vayunmathur.backup.platform.BackupViewModelTest", |
| 43 | "com.vayunmathur.backup.platform.KeyManagerAndWorkerTest", |
| 44 | "com.vayunmathur.backup.service.ConfigurableBackupTransportTest", |
| 45 | "com.vayunmathur.backup.service.TransportWithRepoTest", |
| 46 | ) |
| 47 | ) |
| 48 | } |
| 49 | |
| 50 | dependencies { |
| 51 | // Compile-only stubs for the framework's @SystemApi app-data backup transport |
| 52 | // classes (android.app.backup.BackupTransport + RestoreDescription/RestoreSet). |
| 53 | // Provided by the framework at runtime on a system image; must NOT be packaged. |
| 54 | compileOnly(project(":library:aosp-stubs")) |
| 55 | // WebDAV/Nextcloud remote reaches the server over the platform HTTP stack. |
| 56 | implementation(project(":library:network")) |
| 57 | // Scheduled file/media backups. |
| 58 | implementation(project(":library:work")) |
| 59 | // Optional biometric gate for the recovery code / master key. |
| 60 | implementation(project(":library:biometric")) |
| 61 | // AES-256-GCM segment crypto (aesEncrypt/aesDecrypt, newContentKey). |
| 62 | implementation(project(":library:e2ee-p2p")) |
| 63 | // Local config (backend uri/creds handle, enabled sets, last-run). |
| 64 | implementation(libs.androidx.datastore.preferences) |
| 65 | testImplementation(libs.androidx.work.testing) |
| 66 | testImplementation(project(":library:aosp-stubs")) |
| 67 | } |