Build & Release Android App / build (push) Failing after 3m51s
chore: adjust workflow in Gitea chore(deps): update versions
89 lines
2.7 KiB
Kotlin
89 lines
2.7 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
val tagVersion = (project.findProperty("versionNameOverride") as String?) ?: "0.0.0-dev"
|
|
|
|
val core = tagVersion
|
|
.removePrefix("v")
|
|
.substringBefore("-")
|
|
val parts = core.split(".").map { it.toIntOrNull() ?: 0 }
|
|
val major = parts.getOrElse(0) { 0 }
|
|
val minor = parts.getOrElse(1) { 0 }
|
|
val patch = parts.getOrElse(2) { 0 }
|
|
|
|
android {
|
|
namespace = "de.schanbro.weekfocus"
|
|
compileSdk = 37
|
|
|
|
defaultConfig {
|
|
applicationId = "de.schanbro.weekfocus"
|
|
minSdk = 29
|
|
targetSdk = 37
|
|
versionCode = (major * 10000 + minor * 100 + patch).coerceAtLeast(1)
|
|
versionName = tagVersion
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
splits {
|
|
abi {
|
|
isEnable = true
|
|
reset()
|
|
include("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
|
|
isUniversalApk = true
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
val ksPath = System.getenv("KEYSTORE_PATH")
|
|
if (ksPath != null) {
|
|
storeFile = file(ksPath)
|
|
storePassword = System.getenv("KEYSTORE_PASSWORD")
|
|
keyAlias = System.getenv("KEY_ALIAS")
|
|
keyPassword = System.getenv("KEY_PASSWORD")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = "-dev"
|
|
}
|
|
release {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
optimization {
|
|
enable = false
|
|
}
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
implementation(libs.androidx.material.icons.extended)
|
|
} |