All checks were successful
Build APK / build (push) Successful in 5m55s
Move all user-facing strings into res/values/strings.xml (English base) and add res/values-nl/strings.xml (Dutch). Composables use stringResource; coroutine-set and non-composable strings (ViewModel, PaperlessClient) resolve via Context.getString. Mark app_name translatable=false. Bump to 0.3.0. Fixes #5 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
111 lines
3.4 KiB
Kotlin
111 lines
3.4 KiB
Kotlin
import java.util.Properties
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
// Release signing is driven either by a local keystore.properties (developer machine)
|
|
// or by environment variables (Gitea Actions CI). Nothing secret is committed.
|
|
val keystorePropsFile = rootProject.file("keystore.properties")
|
|
val keystoreProps = Properties().apply {
|
|
if (keystorePropsFile.exists()) load(keystorePropsFile.inputStream())
|
|
}
|
|
|
|
fun signingValue(key: String, env: String): String? =
|
|
keystoreProps.getProperty(key) ?: System.getenv(env)
|
|
|
|
android {
|
|
namespace = "eu.geyskens.pdfscan"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "eu.geyskens.pdfscan"
|
|
minSdk = 26
|
|
targetSdk = 35
|
|
versionCode = 5
|
|
versionName = "0.3.0"
|
|
|
|
// OpenCV native libs are large; ship only the ABIs real phones use.
|
|
ndk {
|
|
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
|
|
}
|
|
}
|
|
|
|
val storePath = signingValue("storeFile", "SIGNING_STORE_FILE")
|
|
signingConfigs {
|
|
if (storePath != null) {
|
|
create("release") {
|
|
storeFile = file(storePath)
|
|
storePassword = signingValue("storePassword", "SIGNING_STORE_PASSWORD")
|
|
keyAlias = signingValue("keyAlias", "SIGNING_KEY_ALIAS")
|
|
keyPassword = signingValue("keyPassword", "SIGNING_KEY_PASSWORD")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = signingConfigs.findByName("release")
|
|
}
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = "-debug"
|
|
}
|
|
}
|
|
|
|
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.viewmodel.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.navigation.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)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
|
|
implementation(libs.androidx.camera.core)
|
|
implementation(libs.androidx.camera.camera2)
|
|
implementation(libs.androidx.camera.lifecycle)
|
|
implementation(libs.androidx.camera.view)
|
|
|
|
implementation(libs.opencv)
|
|
implementation(libs.okhttp)
|
|
|
|
implementation(libs.androidx.datastore.preferences)
|
|
implementation(libs.androidx.security.crypto)
|
|
implementation(libs.accompanist.permissions)
|
|
implementation(libs.androidx.exifinterface)
|
|
implementation(libs.androidx.concurrent.futures.ktx)
|
|
}
|