79 lines
3.6 KiB
Kotlin
79 lines
3.6 KiB
Kotlin
plugins {
|
|
kotlin("multiplatform")
|
|
kotlin("plugin.serialization")
|
|
id("com.android.library")
|
|
id("org.jetbrains.compose")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
}
|
|
|
|
val composeVersion = "1.7.3"
|
|
val coroutinesVersion = "1.9.0"
|
|
val serializationVersion = "1.7.3"
|
|
val okhttpVersion = "4.12.0"
|
|
// Pinned to 0.33.0: the last release built against Compose 1.7.x / Kotlin 2.1.x
|
|
// (0.34.0+ moves to Compose 1.8+). Provides GFM tables, bold/italic/underscore,
|
|
// and the -code module for language-aware syntax highlighting (Highlights).
|
|
val markdownVersion = "0.33.0"
|
|
|
|
kotlin {
|
|
androidTarget()
|
|
jvm("desktop")
|
|
|
|
sourceSets {
|
|
// Both targets are JVM-based (androidTarget + jvm("desktop")), so
|
|
// shared JVM code (File I/O, SHA-256, media cache) lives in jvmMain.
|
|
val jvmMain by creating { dependsOn(commonMain.get()) }
|
|
val androidMain by getting { dependsOn(jvmMain) }
|
|
val desktopMain by getting { dependsOn(jvmMain) }
|
|
|
|
commonMain.dependencies {
|
|
implementation("org.jetbrains.compose.runtime:runtime:$composeVersion")
|
|
implementation("org.jetbrains.compose.foundation:foundation:$composeVersion")
|
|
implementation("org.jetbrains.compose.material3:material3:$composeVersion")
|
|
implementation("org.jetbrains.compose.ui:ui:$composeVersion")
|
|
// Full Material icon set (Icons.Filled.ContentCopy for the code
|
|
// copy buttons); -core only ships a small subset.
|
|
implementation("org.jetbrains.compose.material:material-icons-extended:$composeVersion")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion")
|
|
// OkHttp is a JVM library; both targets here are JVM-based
|
|
// (androidTarget + jvm("desktop")), so it resolves on both.
|
|
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion")
|
|
// Markdown rendering for chat bubbles (M8): core parser/renderer,
|
|
// Material 3 themed defaults, and the -code module for syntax
|
|
// highlighting of fenced code blocks (Highlights).
|
|
implementation("com.mikepenz:multiplatform-markdown-renderer:$markdownVersion")
|
|
implementation("com.mikepenz:multiplatform-markdown-renderer-m3:$markdownVersion")
|
|
implementation("com.mikepenz:multiplatform-markdown-renderer-code:$markdownVersion")
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
// M4: ExoPlayer (Media3) for inline audio/video playback (Android only).
|
|
androidMain.dependencies {
|
|
// M7: EncryptedSharedPreferences for the pairing token
|
|
// (docs/09 §9.7; AndroidSecureStore).
|
|
implementation("androidx.security:security-crypto:1.1.0")
|
|
implementation("androidx.media3:media3-exoplayer:1.3.1")
|
|
implementation("androidx.media3:media3-ui:1.3.1")
|
|
// SAF picker (rememberLauncherForActivityResult).
|
|
implementation("androidx.activity:activity-compose:1.9.2")
|
|
// M5: FCM push (inert without a Firebase project / google-services.json;
|
|
// the ntfy listener is the fallback). The google-services plugin is
|
|
// applied conditionally in the app module.
|
|
implementation("com.google.firebase:firebase-messaging:23.1.2")
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "iris.shared"
|
|
compileSdk = 34
|
|
defaultConfig {
|
|
minSdk = 29
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
} |