Play blocks updates from August 31, 2026 unless the app targets API 36. Bump compileSdk/targetSdk to 36 in :app and :baselineprofile, and AGP to 8.10.1 -- 8.7.3 cannot build against API 36. Gradle stays at 8.11.1, which is what AGP 8.10 requires. Nothing in the app relies on the behaviours Android 16 changed: edge-to-edge is already opted in via enableEdgeToEdge(), the manifest pins no orientation or resizability, and the two bundled native libraries (graphics-path, datastore_shared_counter) are already 16 KB page aligned. Align the version with iOS (1.8.1, code 88) so the API 36 build can ship.
128 lines
4.0 KiB
Kotlin
128 lines
4.0 KiB
Kotlin
import java.io.FileInputStream
|
|
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
alias(libs.plugins.ksp)
|
|
alias(libs.plugins.baselineprofile)
|
|
}
|
|
|
|
// Release signing credentials, loaded from android/keystore.properties (gitignored).
|
|
// Falls back to no release signing when the file/keystore is absent (e.g. CI without secrets).
|
|
val keystoreProps = Properties().apply {
|
|
val f = rootProject.file("keystore.properties")
|
|
if (f.exists()) load(FileInputStream(f))
|
|
}
|
|
val hasReleaseSigning = keystoreProps.getProperty("storeFile")?.let { file(it).exists() } == true
|
|
|
|
android {
|
|
namespace = "app.voltplan.cable"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "app.voltplan.cable"
|
|
minSdk = 26
|
|
targetSdk = 36
|
|
versionCode = 88
|
|
versionName = "1.8.1"
|
|
|
|
// Aptabase analytics — mirrors the iOS configuration (the iPhone app's tracker).
|
|
buildConfigField("String", "APTABASE_APP_KEY", "\"A-SH-4260269603\"")
|
|
buildConfigField("String", "APTABASE_HOST", "\"https://apta.yuzuhub.com\"")
|
|
|
|
vectorDrawables { useSupportLibrary = true }
|
|
resourceConfigurations += listOf("en", "de", "es", "fr", "nl")
|
|
}
|
|
|
|
signingConfigs {
|
|
if (hasReleaseSigning) {
|
|
create("release") {
|
|
storeFile = file(keystoreProps.getProperty("storeFile"))
|
|
storePassword = keystoreProps.getProperty("storePassword")
|
|
keyAlias = keystoreProps.getProperty("keyAlias")
|
|
keyPassword = keystoreProps.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
isMinifyEnabled = false
|
|
}
|
|
release {
|
|
if (hasReleaseSigning) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro",
|
|
)
|
|
// Bundle native debug symbols so Play can symbolicate native crashes/ANRs.
|
|
ndk {
|
|
debugSymbolLevel = "FULL"
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.ui)
|
|
implementation(libs.androidx.ui.graphics)
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
implementation(libs.androidx.material3)
|
|
implementation(libs.androidx.material.icons.extended)
|
|
implementation(libs.androidx.navigation.compose)
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
|
|
implementation(libs.androidx.room.runtime)
|
|
implementation(libs.androidx.room.ktx)
|
|
ksp(libs.androidx.room.compiler)
|
|
|
|
implementation(libs.androidx.datastore.preferences)
|
|
|
|
implementation(libs.retrofit)
|
|
implementation(libs.retrofit.serialization)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.okhttp.logging)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
|
|
implementation(libs.coil.compose)
|
|
|
|
implementation(libs.play.review.ktx)
|
|
|
|
// Installs the bundled baseline profile on devices that do not get it from Play.
|
|
implementation(libs.androidx.profileinstaller)
|
|
|
|
// Consumes the profile produced by :baselineprofile.
|
|
baselineProfile(project(":baselineprofile"))
|
|
}
|