mirror of
https://github.com/vide/matedroid.git
synced 2026-01-20 00:03:17 +08:00
124 lines
3.6 KiB
Kotlin
124 lines
3.6 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.hilt)
|
|
alias(libs.plugins.ksp)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.matedroid"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "com.matedroid"
|
|
minSdk = 26
|
|
targetSdk = 35
|
|
versionCode = 6
|
|
versionName = "0.5.1"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
// CI: use secrets from environment variables
|
|
// Local: fall back to debug keystore
|
|
val keystorePath = System.getenv("KEYSTORE_BASE64")?.let { "release.keystore" }
|
|
?: "${System.getProperty("user.home")}/.android/debug.keystore"
|
|
storeFile = file(keystorePath)
|
|
storePassword = System.getenv("KEYSTORE_PASSWORD") ?: "android"
|
|
keyAlias = System.getenv("KEY_ALIAS") ?: "androiddebugkey"
|
|
keyPassword = System.getenv("KEY_PASSWORD") ?: "android"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
signingConfig = signingConfigs.getByName("release")
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
debug {
|
|
isMinifyEnabled = false
|
|
}
|
|
}
|
|
|
|
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 {
|
|
// Core Android
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
// 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)
|
|
|
|
// Hilt
|
|
implementation(libs.hilt.android)
|
|
ksp(libs.hilt.compiler)
|
|
implementation(libs.hilt.navigation.compose)
|
|
|
|
// Networking
|
|
implementation(libs.retrofit)
|
|
implementation(libs.retrofit.converter.moshi)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.okhttp.logging)
|
|
implementation(libs.moshi)
|
|
implementation(libs.moshi.kotlin)
|
|
ksp(libs.moshi.codegen)
|
|
|
|
// DataStore
|
|
implementation(libs.datastore.preferences)
|
|
implementation(libs.security.crypto)
|
|
|
|
// Charts
|
|
implementation(libs.vico.compose.m3)
|
|
|
|
// Maps
|
|
implementation(libs.osmdroid)
|
|
|
|
// Testing
|
|
testImplementation(libs.junit)
|
|
testImplementation(libs.coroutines.test)
|
|
testImplementation(libs.mockk)
|
|
testImplementation(libs.turbine)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
}
|