2026-03-08 18:33:38 +01:00
|
|
|
import java.util.Properties
|
|
|
|
|
|
2026-03-08 16:14:19 +01:00
|
|
|
plugins {
|
|
|
|
|
id("com.android.application")
|
|
|
|
|
id("org.jetbrains.kotlin.android")
|
|
|
|
|
id("com.google.devtools.ksp")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
namespace = "no.naiv.tilfluktsrom"
|
|
|
|
|
compileSdk = 35
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId = "no.naiv.tilfluktsrom"
|
|
|
|
|
minSdk = 26
|
|
|
|
|
targetSdk = 35
|
2026-03-23 15:03:19 +01:00
|
|
|
versionCode = 11
|
|
|
|
|
versionName = "1.7.0"
|
2026-03-23 16:37:13 +01:00
|
|
|
|
|
|
|
|
// Deep link domain — single source of truth for manifest + Kotlin code
|
|
|
|
|
val deepLinkDomain = "tilfluktsrom.naiv.no"
|
|
|
|
|
buildConfigField("String", "DEEP_LINK_DOMAIN", "\"$deepLinkDomain\"")
|
|
|
|
|
manifestPlaceholders["deepLinkHost"] = deepLinkDomain
|
2026-03-14 13:15:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependenciesInfo {
|
|
|
|
|
includeInApk = false
|
|
|
|
|
includeInBundle = false
|
2026-03-08 16:14:19 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-08 18:44:19 +01:00
|
|
|
signingConfigs {
|
|
|
|
|
create("release") {
|
2026-03-10 20:29:53 +01:00
|
|
|
val keystorePropsFile = rootProject.file("keystore.properties")
|
|
|
|
|
if (keystorePropsFile.exists()) {
|
|
|
|
|
val keystoreProps = Properties().apply {
|
|
|
|
|
keystorePropsFile.inputStream().use { load(it) }
|
|
|
|
|
}
|
|
|
|
|
storeFile = file(keystoreProps.getProperty("storeFile"))
|
|
|
|
|
storePassword = keystoreProps.getProperty("storePassword")
|
|
|
|
|
keyAlias = keystoreProps.getProperty("keyAlias")
|
|
|
|
|
keyPassword = keystoreProps.getProperty("keyPassword")
|
2026-03-08 18:44:19 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-10 20:25:47 +01:00
|
|
|
flavorDimensions += "distribution"
|
|
|
|
|
productFlavors {
|
|
|
|
|
create("standard") {
|
|
|
|
|
dimension = "distribution"
|
|
|
|
|
}
|
|
|
|
|
create("fdroid") {
|
|
|
|
|
dimension = "distribution"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-08 16:14:19 +01:00
|
|
|
buildTypes {
|
|
|
|
|
release {
|
|
|
|
|
isMinifyEnabled = true
|
|
|
|
|
isShrinkResources = true
|
2026-03-08 18:44:19 +01:00
|
|
|
signingConfig = signingConfigs.getByName("release")
|
2026-03-08 16:14:19 +01:00
|
|
|
proguardFiles(
|
|
|
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
|
|
|
"proguard-rules.pro"
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
viewBinding = true
|
2026-03-08 18:33:38 +01:00
|
|
|
buildConfig = true
|
2026-03-08 16:14:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
jvmTarget = "17"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
// AndroidX
|
|
|
|
|
implementation("androidx.core:core-ktx:1.13.1")
|
|
|
|
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
|
|
|
|
implementation("androidx.activity:activity-ktx:1.9.3")
|
|
|
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
|
|
|
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
|
|
|
|
implementation("com.google.android.material:material:1.12.0")
|
|
|
|
|
implementation("androidx.constraintlayout:constraintlayout:2.2.0")
|
|
|
|
|
|
|
|
|
|
// Room (local database for shelter cache)
|
|
|
|
|
implementation("androidx.room:room-runtime:2.6.1")
|
|
|
|
|
implementation("androidx.room:room-ktx:2.6.1")
|
|
|
|
|
ksp("androidx.room:room-compiler:2.6.1")
|
|
|
|
|
|
|
|
|
|
// OkHttp (HTTP client for data downloads)
|
|
|
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
|
|
|
|
|
|
|
|
|
// OSMDroid (offline-capable OpenStreetMap)
|
|
|
|
|
implementation("org.osmdroid:osmdroid-android:6.1.20")
|
|
|
|
|
|
2026-03-10 20:25:47 +01:00
|
|
|
// Google Play Services Location (precise GPS) — standard flavor only
|
|
|
|
|
"standardImplementation"("com.google.android.gms:play-services-location:21.3.0")
|
2026-03-08 16:14:19 +01:00
|
|
|
|
2026-03-08 22:34:33 +01:00
|
|
|
// WorkManager (periodic widget updates)
|
|
|
|
|
implementation("androidx.work:work-runtime-ktx:2.9.1")
|
|
|
|
|
|
2026-03-08 16:14:19 +01:00
|
|
|
// Coroutines
|
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
|
|
|
|
|
}
|