chore: upgrade toolchain to AGP 9.2.1 / Gradle 9 / nixpkgs 26.05
build / build (push) Has been cancelled

- nixpkgs 25.11 → 26.05; gradle_9 + jdk21; build-tools 35 → 36
- Drop custom gradle wrapper — GRADLE_OPTS works post-nixpkgs PR #449037
- AGP 8.7.3 → 9.2.1; Kotlin plugin removed (built-in since AGP 9)
- compileSdk/targetSdk 34 → 35; buildToolsVersion pinned to 36.0.0
- Java/Kotlin target 17 → 21; resValues feature flag required by AGP 9
- applicationVariants (removed in AGP 9) → androidComponents.onVariants
- Test task: testWeatherReleaseUnitTest → :app:test (all flavors, debug)
- CI artifact path fixed to cover all flavor APKs
- Docs: drop nix develop --command prefix (direnv activates shell)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 20:12:22 +02:00
parent 32e45c266d
commit b57e65f760
7 changed files with 44 additions and 60 deletions
+15 -17
View File
@@ -2,7 +2,6 @@ import org.yaml.snakeyaml.Yaml
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
@Suppress("UNCHECKED_CAST")
@@ -11,18 +10,20 @@ val webviews: Map<String, Map<String, String>> =
android {
namespace = "cz.c3c.webviewkiosk"
compileSdk = 34
compileSdk = 35
buildToolsVersion = "36.0.0"
defaultConfig {
applicationId = "cz.c3c.webviewkiosk"
minSdk = 26 // Sony KD-65XE9305 final firmware = Android 8.0
targetSdk = 34
targetSdk = 35
versionCode = 1 // bump on every release; adb install -r refuses downgrades
versionName = "0.1.0"
}
buildFeatures {
buildConfig = true
resValues = true
}
signingConfigs {
@@ -54,22 +55,19 @@ android {
}
}
@Suppress("DEPRECATION")
applicationVariants.all {
val flavor = productFlavors.first().name
val type = buildType.name
outputs.all {
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl)
.outputFileName = "$flavor-$type.apk"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
kotlinOptions {
jvmTarget = "17"
}
androidComponents {
onVariants { variant ->
variant.outputs.forEach { output ->
val flavor = variant.productFlavors.firstOrNull()?.second ?: variant.name
val buildType = variant.buildType ?: "debug"
output.outputFileName.set("$flavor-$buildType.apk")
}
}
}