update
This commit is contained in:
66
android/app/build.gradle.kts
Normal file
66
android/app/build.gradle.kts
Normal file
@@ -0,0 +1,66 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
}
|
||||
|
||||
// Server-Zugang aus der .env im Projektordner in die App einbauen, damit nichts eingetippt werden muss
|
||||
val env = Properties().apply {
|
||||
val file = rootProject.file("../.env")
|
||||
if (file.exists()) file.reader().use { load(it) }
|
||||
}
|
||||
fun envValue(key: String, default: String) = env.getProperty(key)?.trim()?.trim('"', '\'')?.ifEmpty { null } ?: default
|
||||
val syncUrl = envValue("SYNC_URL", "https://planer.marha.de")
|
||||
val syncToken = envValue("SYNC_TOKEN", "")
|
||||
|
||||
android {
|
||||
namespace = "de.marha.planer"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "de.marha.planer"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
buildConfigField("String", "SYNC_URL", "\"$syncUrl\"")
|
||||
buildConfigField("String", "SYNC_TOKEN", "\"$syncToken\"")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
buildFeatures {
|
||||
compose = true
|
||||
buildConfig = true
|
||||
}
|
||||
testOptions {
|
||||
unitTests.isReturnDefaultValues = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val composeBom = platform("androidx.compose:compose-bom:2024.09.02")
|
||||
implementation(composeBom)
|
||||
implementation("androidx.activity:activity-compose:1.9.2")
|
||||
implementation("androidx.compose.material3:material3")
|
||||
implementation("androidx.compose.material:material-icons-extended")
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.foundation:foundation")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.6")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.json:json:20240303")
|
||||
}
|
||||
Reference in New Issue
Block a user