b57e65f760
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>
77 lines
2.0 KiB
Kotlin
77 lines
2.0 KiB
Kotlin
import org.yaml.snakeyaml.Yaml
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
}
|
|
|
|
@Suppress("UNCHECKED_CAST")
|
|
val webviews: Map<String, Map<String, String>> =
|
|
Yaml().load(rootProject.file("webviews.yaml").inputStream())
|
|
|
|
android {
|
|
namespace = "cz.c3c.webviewkiosk"
|
|
compileSdk = 35
|
|
buildToolsVersion = "36.0.0"
|
|
|
|
defaultConfig {
|
|
applicationId = "cz.c3c.webviewkiosk"
|
|
minSdk = 26 // Sony KD-65XE9305 final firmware = Android 8.0
|
|
targetSdk = 35
|
|
versionCode = 1 // bump on every release; adb install -r refuses downgrades
|
|
versionName = "0.1.0"
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig = true
|
|
resValues = true
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
storeFile = rootProject.file("signing/release.keystore")
|
|
storePassword = "android-webview-kiosk"
|
|
keyAlias = "kiosk"
|
|
keyPassword = "android-webview-kiosk"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
|
|
flavorDimensions += "webview"
|
|
|
|
productFlavors {
|
|
webviews.forEach { (name, config) ->
|
|
create(name) {
|
|
dimension = "webview"
|
|
applicationIdSuffix = ".$name"
|
|
buildConfigField("String", "WEBVIEW_URL", "\"${config["url"]}\"")
|
|
resValue("string", "app_name", "C3C ${config["label"] ?: name}")
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
}
|
|
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation("junit:junit:4.13.2")
|
|
}
|