All checks were successful
release / build-release (push) Successful in 5m21s
Valfria fält vid ny mätning och rättning; visas i historiklistan. Tomt fält vid rättning rensar värdet på servern (-1-konventionen). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kf4MAbZ3c3B4Xy5XfuGsCP
89 lines
3.0 KiB
Plaintext
89 lines
3.0 KiB
Plaintext
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)
|
|
}
|
|
|
|
// Signeringsnyckeln är inte incheckad. Lokalt ligger den i signing/ (gitignorerad),
|
|
// i CI skrivs den dit från Actions-secrets. Saknas den signeras release med
|
|
// debug-nyckeln så att en färsk klon ändå kan bygga.
|
|
val keystorePropsFile = rootProject.file("signing/keystore.properties")
|
|
val keystoreProps: Properties? = keystorePropsFile.takeIf { it.exists() }?.let { file ->
|
|
Properties().apply { file.inputStream().use { load(it) } }
|
|
}
|
|
|
|
// CI (Gitea Actions) sätter GITHUB_RUN_NUMBER — ger stigande versionCode så
|
|
// att telefonen accepterar varje nytt CI-bygge som en uppdatering.
|
|
val ciRunNumber = System.getenv("GITHUB_RUN_NUMBER")?.toIntOrNull()
|
|
|
|
android {
|
|
namespace = "eu.brassepc.fitnessdroid"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "eu.brassepc.fitnessdroid"
|
|
minSdk = 31
|
|
targetSdk = 35
|
|
versionCode = ciRunNumber ?: 1
|
|
versionName = "0.3.1" + (ciRunNumber?.let { "+build.$it" } ?: "-dev")
|
|
}
|
|
|
|
signingConfigs {
|
|
keystoreProps?.let { props ->
|
|
create("release") {
|
|
storeFile = rootProject.file("signing/${props.getProperty("storeFile")}")
|
|
storePassword = props.getProperty("storePassword")
|
|
keyAlias = props.getProperty("keyAlias")
|
|
keyPassword = props.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
signingConfig = if (keystoreProps != null) {
|
|
signingConfigs.getByName("release")
|
|
} else {
|
|
signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.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.compose.ui)
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.compose.material.icons.extended)
|
|
implementation(libs.androidx.navigation.compose)
|
|
implementation(libs.androidx.datastore.preferences)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.androidx.room.runtime)
|
|
implementation(libs.androidx.room.ktx)
|
|
ksp(libs.androidx.room.compiler)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
}
|