Biometric lock: opt-in Face ID/Touch ID/fingerprint app lock with toggle in ProfileScreen. Locks on background, requires auth on foreground return. Platform implementations: BiometricPrompt (Android), LAContext (iOS). Rate limit: 429 responses parsed with Retry-After header, user-friendly error messages in all 10 locales, retry plugin respects 429. ErrorMessageParser updated for both iOS Swift and KMM.
171 lines
5.5 KiB
Kotlin
171 lines
5.5 KiB
Kotlin
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
|
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
alias(libs.plugins.androidApplication)
|
|
alias(libs.plugins.composeMultiplatform)
|
|
alias(libs.plugins.composeCompiler)
|
|
alias(libs.plugins.composeHotReload)
|
|
alias(libs.plugins.kotlinxSerialization)
|
|
alias(libs.plugins.googleServices)
|
|
id("co.touchlab.skie") version "0.10.7"
|
|
}
|
|
|
|
kotlin {
|
|
androidTarget {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_11)
|
|
}
|
|
}
|
|
|
|
listOf(
|
|
iosArm64(),
|
|
iosSimulatorArm64()
|
|
).forEach { iosTarget ->
|
|
iosTarget.binaries.framework {
|
|
baseName = "ComposeApp"
|
|
isStatic = true
|
|
}
|
|
}
|
|
|
|
jvm()
|
|
|
|
js {
|
|
browser()
|
|
binaries.executable()
|
|
}
|
|
|
|
@OptIn(ExperimentalWasmDsl::class)
|
|
wasmJs {
|
|
browser()
|
|
binaries.executable()
|
|
}
|
|
|
|
sourceSets {
|
|
androidMain.dependencies {
|
|
implementation(compose.preview)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.ktor.client.okhttp)
|
|
|
|
// implementation(libs.ktor.client.logging)
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
implementation(libs.google.billing)
|
|
|
|
// PostHog Analytics
|
|
implementation("com.posthog:posthog-android:3.8.2")
|
|
|
|
// Google Sign In - Credential Manager
|
|
implementation("androidx.credentials:credentials:1.3.0")
|
|
implementation("androidx.credentials:credentials-play-services-auth:1.3.0")
|
|
implementation("com.google.android.libraries.identity.googleid:googleid:1.1.1")
|
|
|
|
// Jetpack Glance for Home Screen Widgets
|
|
implementation("androidx.glance:glance-appwidget:1.1.1")
|
|
implementation("androidx.glance:glance-material3:1.1.1")
|
|
|
|
// DataStore for widget data persistence
|
|
implementation("androidx.datastore:datastore-preferences:1.1.1")
|
|
|
|
// Encrypted SharedPreferences for secure token storage
|
|
implementation(libs.androidx.security.crypto)
|
|
|
|
// Biometric authentication (requires FragmentActivity)
|
|
implementation("androidx.biometric:biometric:1.1.0")
|
|
implementation("androidx.fragment:fragment-ktx:1.8.5")
|
|
}
|
|
iosMain.dependencies {
|
|
implementation(libs.ktor.client.darwin)
|
|
}
|
|
jvmMain.dependencies {
|
|
implementation(compose.desktop.currentOs)
|
|
implementation(libs.kotlinx.coroutinesSwing)
|
|
implementation(libs.ktor.client.cio)
|
|
}
|
|
jsMain.dependencies {
|
|
implementation(libs.ktor.client.js)
|
|
}
|
|
wasmJsMain.dependencies {
|
|
implementation(libs.ktor.client.js)
|
|
}
|
|
commonMain.dependencies {
|
|
implementation(libs.ktor.serialization.kotlinx.json)
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(compose.runtime)
|
|
implementation(compose.foundation)
|
|
implementation(compose.material3)
|
|
implementation(compose.ui)
|
|
implementation(compose.components.resources)
|
|
implementation(compose.components.uiToolingPreview)
|
|
implementation(libs.androidx.lifecycle.viewmodelCompose)
|
|
implementation(libs.androidx.lifecycle.runtimeCompose)
|
|
implementation(libs.androidx.navigation.compose)
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
implementation(libs.kotlinx.datetime)
|
|
implementation(libs.ktor.client.logging)
|
|
implementation(libs.ktor.client.encoding)
|
|
implementation(compose.materialIconsExtended)
|
|
implementation(libs.coil.compose)
|
|
implementation(libs.coil.network.ktor3)
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(libs.kotlin.test)
|
|
implementation(libs.ktor.client.mock)
|
|
implementation(libs.kotlinx.coroutines.test)
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "com.tt.honeyDue"
|
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
|
|
defaultConfig {
|
|
applicationId = "com.tt.honeyDue"
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
buildTypes {
|
|
getByName("release") {
|
|
isMinifyEnabled = false
|
|
}
|
|
}
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
debugImplementation(compose.uiTooling)
|
|
|
|
// Firebase Cloud Messaging - use specific version for KMM compatibility
|
|
implementation("com.google.firebase:firebase-messaging-ktx:24.1.0")
|
|
implementation("com.google.firebase:firebase-bom:34.0.0")
|
|
}
|
|
|
|
compose.desktop {
|
|
application {
|
|
mainClass = "com.tt.honeyDue.MainKt"
|
|
|
|
nativeDistributions {
|
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
|
packageName = "com.tt.honeyDue"
|
|
packageVersion = "1.0.0"
|
|
}
|
|
}
|
|
}
|