CORE-001 Android-Projekt anlegen Feature
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
// Bewusst keine Gradle Version Catalog (libs.versions.toml) für dieses Ein-Modul-Projekt:
|
||||
// Ein Version Catalog lohnt sich vor allem bei mehreren Modulen mit gemeinsam genutzten
|
||||
// Versionen. Hier reicht eine einzige, gut lesbare build.gradle.kts.
|
||||
//
|
||||
// WICHTIG: Diese Versionsnummern wurden nach bestem Wissen anhand der zum Zeitpunkt der
|
||||
// Erstellung aktuellen offiziellen Android-/Kotlin-Dokumentation gewählt. Da dieses Projekt
|
||||
// in der Entwicklungsumgebung, in der es erzeugt wurde, nicht gegen die echten Google-/Maven-
|
||||
// Repositories synchronisiert werden konnte, prüfe beim ersten Öffnen in Android Studio bitte
|
||||
// insbesondere die KSP-Version (muss exakt zur Kotlin-Version passen, siehe
|
||||
// https://github.com/google/ksp/releases) und aktualisiere sie bei Bedarf über den
|
||||
// "Upgrade Assistant" bzw. die jeweiligen Release-Notes-Seiten.
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("org.jetbrains.kotlin.plugin.compose")
|
||||
id("org.jetbrains.kotlin.plugin.serialization")
|
||||
id("com.google.devtools.ksp")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "de.medapp.wunddoku"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "de.medapp.wunddoku"
|
||||
// minSdk 26 (Android 8.0): java.time (Instant, LocalDate) ist ab API 26 nativ
|
||||
// verfügbar, ohne Desugaring-Konfiguration – vereinfacht die Datum/Zeit-Behandlung
|
||||
// im gesamten Projekt spürbar.
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
|
||||
// Room exportiert bei exportSchema = true die Schema-Historie als JSON hierher – Grundlage
|
||||
// für nachvollziehbare, spätere Migrationen (Aufgabenstellung Abschnitt 16).
|
||||
ksp {
|
||||
arg("room.schemaLocation", "$projectDir/schemas")
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// --- Kotlin / Coroutines ---
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3") // für typsichere Nav-Routen
|
||||
|
||||
// --- AndroidX Core / Lifecycle ---
|
||||
implementation("androidx.core:core-ktx:1.15.0")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
|
||||
implementation("androidx.activity:activity-compose:1.9.3")
|
||||
|
||||
// --- Jetpack Compose (über BOM, damit alle Compose-Bibliotheken zueinander passen) ---
|
||||
val composeBom = platform("androidx.compose:compose-bom:2026.02.00")
|
||||
implementation(composeBom)
|
||||
androidTestImplementation(composeBom)
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.ui:ui-graphics")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||
implementation("androidx.compose.material3:material3")
|
||||
implementation("androidx.compose.material:material-icons-extended")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||
|
||||
// --- Navigation Compose (typsichere Routen) ---
|
||||
implementation("androidx.navigation:navigation-compose:2.8.4")
|
||||
|
||||
// --- Room ---
|
||||
val roomVersion = "2.8.4"
|
||||
implementation("androidx.room:room-runtime:$roomVersion")
|
||||
implementation("androidx.room:room-ktx:$roomVersion")
|
||||
ksp("androidx.room:room-compiler:$roomVersion")
|
||||
|
||||
// --- EXIF-Auswertung für Fotos (Abschnitt 10/11 der Architektur, ab Phase 4 genutzt) ---
|
||||
implementation("androidx.exifinterface:exifinterface:1.3.7")
|
||||
|
||||
// --- Adaptive Layouts (Smartphone/Tablet, Abschnitt 15 der Architektur) ---
|
||||
implementation("androidx.compose.material3.adaptive:adaptive:1.0.0")
|
||||
|
||||
// --- Tests ---
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0")
|
||||
testImplementation("androidx.room:room-testing:$roomVersion")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
|
||||
}
|
||||
Reference in New Issue
Block a user