Ncal/ncal/app/build.gradle.kts

123 lines
4.0 KiB
Plaintext

import java.io.FileInputStream
import java.util.Properties
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
}
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties().apply {
if (keystorePropertiesFile.exists()) load(FileInputStream(keystorePropertiesFile))
}
android {
namespace = "com.homelab.ncal"
compileSdk = 34
defaultConfig {
applicationId = "com.homelab.ncal"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
}
signingConfigs {
create("release") {
if (keystorePropertiesFile.exists()) {
storeFile = rootProject.file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
}
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.getByName("release")
}
}
testOptions {
unitTests {
// IcsMapper.parse() logs via android.util.Log, which throws "not mocked" in a plain
// JVM unit test otherwise - return defaults instead of pulling in Robolectric just
// for that.
isReturnDefaultValues = true
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.3")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.3")
implementation("androidx.activity:activity-compose:1.9.0")
// Compose
implementation(platform("androidx.compose:compose-bom:2024.09.00"))
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")
// Navigation
implementation("androidx.navigation:navigation-compose:2.7.7")
// Room
implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")
// Networking (CalDAV/WebDAV over HTTP)
implementation("com.squareup.okhttp3:okhttp:4.12.0")
// iCalendar (RFC 5545) parsing/generation for VEVENT/VTODO
implementation("net.sf.biweekly:biweekly:0.6.8")
// Encrypted storage for server credentials
implementation("androidx.security:security-crypto:1.1.0-alpha06")
// Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
// WorkManager - required transitively by Glance's own widget-scheduling machinery;
// declared explicitly to pin a current version rather than Glance's older transitive default.
implementation("androidx.work:work-runtime-ktx:2.9.0")
// Home screen widget (month calendar)
implementation("androidx.glance:glance-appwidget:1.1.1")
// Encrypts the local Room cache at rest (calendar/task content), same as credentials already are
implementation("net.zetetic:android-database-sqlcipher:4.5.4")
testImplementation("junit:junit:4.13.2")
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
}