Cache each Robolectric SDK without version conflicts
Some checks failed
review/safety-opus Blocking: versionCode ledger bypassable; tv-publish lacks monotonic check
Some checks failed
review/safety-opus Blocking: versionCode ledger bypassable; tv-publish lacks monotonic check
This commit is contained in:
parent
d171aaae9e
commit
c78a8dfa8d
2 changed files with 15 additions and 9 deletions
|
|
@ -11,6 +11,10 @@ make test # app default/debug suite plus wolfskin-design JVM/capture suite
|
|||
make apk-debug # default debug, no secrets; MPV stub and no extra codec decoders
|
||||
```
|
||||
|
||||
Offline JVM tests use instrumented Android 9, 11 and 14 SDK jars. Cache preparation
|
||||
resolves each SDK independently; putting all three versions in one Gradle
|
||||
configuration selects only the newest and prevents older-SDK tests from starting.
|
||||
|
||||
APKs remain under `app/build/outputs/apk/default/{release,debug,optimized}/`. Debug builds
|
||||
are not playback-complete and must not be distributed as releases. Upstream's
|
||||
`.github/workflows` and dependency version catalog are unchanged; release builds
|
||||
|
|
|
|||
|
|
@ -19,13 +19,18 @@ android {
|
|||
}
|
||||
kotlin.compilerOptions.jvmTarget = JvmTarget.JVM_11
|
||||
|
||||
val robolectricSdk by configurations.creating {
|
||||
isCanBeResolved = true
|
||||
isCanBeConsumed = false
|
||||
isTransitive = false
|
||||
}
|
||||
val cacheRobolectricSdk by tasks.registering(Copy::class) {
|
||||
from(robolectricSdk)
|
||||
val versions = listOf(
|
||||
"9-robolectric-4913185-2-i7",
|
||||
"11-robolectric-6757853-i7",
|
||||
"14-robolectric-10818077-i7",
|
||||
)
|
||||
// One configuration would evict the older SDKs through version conflict resolution.
|
||||
from(versions.map { version ->
|
||||
project.configurations.detachedConfiguration(
|
||||
project.dependencies.create("org.robolectric:android-all-instrumented:$version"),
|
||||
).apply { isTransitive = false }
|
||||
})
|
||||
into(layout.buildDirectory.dir("robolectric-sdk"))
|
||||
}
|
||||
|
||||
|
|
@ -50,9 +55,6 @@ tasks.withType<Test>().configureEach {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
robolectricSdk("org.robolectric:android-all-instrumented:9-robolectric-4913185-2-i7")
|
||||
robolectricSdk("org.robolectric:android-all-instrumented:11-robolectric-6757853-i7")
|
||||
robolectricSdk("org.robolectric:android-all-instrumented:14-robolectric-10818077-i7")
|
||||
implementation(platform(libs.androidx.compose.bom))
|
||||
implementation(libs.androidx.compose.ui)
|
||||
implementation(libs.androidx.tv.material)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue