2023-07-01 14:44:36 -05:00
|
|
|
plugins {
|
|
|
|
kotlin("multiplatform")
|
|
|
|
id("org.jetbrains.compose")
|
|
|
|
id("com.android.library")
|
|
|
|
id("org.jetbrains.kotlin.plugin.serialization")
|
|
|
|
id("dev.icerock.mobile.multiplatform-resources")
|
|
|
|
id("com.github.gmazzo.buildconfig") version "4.0.4"
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "chat.simplex"
|
|
|
|
version = extra["android.version_name"] as String
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
android()
|
|
|
|
jvm("desktop") {
|
|
|
|
jvmToolchain(11)
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
all {
|
|
|
|
languageSettings {
|
|
|
|
optIn("kotlinx.coroutines.DelicateCoroutinesApi")
|
|
|
|
optIn("androidx.compose.foundation.ExperimentalFoundationApi")
|
|
|
|
optIn("androidx.compose.ui.text.ExperimentalTextApi")
|
|
|
|
optIn("androidx.compose.material.ExperimentalMaterialApi")
|
|
|
|
optIn("com.arkivanov.decompose.ExperimentalDecomposeApi")
|
|
|
|
optIn("kotlinx.serialization.InternalSerializationApi")
|
|
|
|
optIn("kotlinx.serialization.ExperimentalSerializationApi")
|
|
|
|
optIn("androidx.compose.ui.ExperimentalComposeUiApi")
|
|
|
|
optIn("com.google.accompanist.permissions.ExperimentalPermissionsApi")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val commonMain by getting {
|
|
|
|
dependencies {
|
|
|
|
api(compose.runtime)
|
|
|
|
api(compose.foundation)
|
|
|
|
api(compose.material)
|
|
|
|
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
|
|
|
|
api("org.jetbrains.kotlinx:kotlinx-datetime:0.3.2")
|
|
|
|
api("com.russhwolf:multiplatform-settings:1.0.0")
|
|
|
|
api("com.charleskorn.kaml:kaml:0.43.0")
|
|
|
|
api("dev.icerock.moko:resources-compose:0.22.3")
|
|
|
|
api("org.jetbrains.compose.ui:ui-text:${rootProject.extra["compose.version"] as String}")
|
|
|
|
implementation("org.jetbrains.compose.components:components-animatedimage:${rootProject.extra["compose.version"] as String}")
|
|
|
|
//Barcode
|
|
|
|
api("org.boofcv:boofcv-core:0.40.1")
|
|
|
|
implementation("com.godaddy.android.colorpicker:compose-color-picker-jvm:0.7.0")
|
|
|
|
// Link Previews
|
|
|
|
implementation("org.jsoup:jsoup:1.13.1")
|
2023-07-04 07:32:28 -05:00
|
|
|
// Resources
|
|
|
|
implementation("dev.icerock.moko:resources:0.22.3")
|
2023-07-01 14:44:36 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val commonTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val androidMain by getting {
|
|
|
|
dependencies {
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("androidx.activity:activity-compose:1.5.0")
|
2023-07-01 14:44:36 -05:00
|
|
|
val work_version = "2.7.1"
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("androidx.work:work-runtime-ktx:$work_version")
|
|
|
|
implementation("com.google.accompanist:accompanist-insets:0.23.0")
|
|
|
|
implementation("dev.icerock.moko:resources:0.22.3")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
|
|
|
// Video support
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("com.google.android.exoplayer:exoplayer:2.17.1")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
|
|
|
// Biometric authentication
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("androidx.biometric:biometric:1.2.0-alpha04")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
|
|
|
//Barcode
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("org.boofcv:boofcv-android:0.40.1")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
|
|
|
//Camera Permission
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("com.google.accompanist:accompanist-permissions:0.23.0")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("androidx.webkit:webkit:1.4.0")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
|
|
|
// GIFs support
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("io.coil-kt:coil-compose:2.1.0")
|
|
|
|
implementation("io.coil-kt:coil-gif:2.1.0")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("com.jakewharton:process-phoenix:2.1.2")
|
2023-07-01 14:44:36 -05:00
|
|
|
|
|
|
|
val camerax_version = "1.1.0-beta01"
|
2023-07-12 08:42:10 -05:00
|
|
|
implementation("androidx.camera:camera-core:${camerax_version}")
|
|
|
|
implementation("androidx.camera:camera-camera2:${camerax_version}")
|
|
|
|
implementation("androidx.camera:camera-lifecycle:${camerax_version}")
|
|
|
|
implementation("androidx.camera:camera-view:${camerax_version}")
|
2023-07-01 14:44:36 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val desktopMain by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.7.1")
|
2023-07-26 03:35:29 -05:00
|
|
|
implementation("com.github.Dansoftowner:jSystemThemeDetector:3.6")
|
2023-07-28 13:01:08 -05:00
|
|
|
implementation("com.sshtools:two-slices:0.9.0-SNAPSHOT")
|
2023-07-27 02:47:11 -05:00
|
|
|
implementation("org.slf4j:slf4j-simple:2.0.7")
|
2023-07-01 14:44:36 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val desktopTest by getting
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion(33)
|
|
|
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion(26)
|
|
|
|
targetSdkVersion(33)
|
|
|
|
}
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
2023-08-04 16:28:09 -05:00
|
|
|
val isAndroid = gradle.startParameter.taskNames.find {
|
|
|
|
val lower = it.toLowerCase()
|
|
|
|
lower.contains("release") || lower.startsWith("assemble") || lower.startsWith("install")
|
|
|
|
} != null
|
|
|
|
if (isAndroid) {
|
|
|
|
// This is not needed on Android but can't be moved to desktopMain because MR lib don't support this.
|
|
|
|
// No other ways to exclude a file work but it's large and should be excluded
|
|
|
|
kotlin.sourceSets["commonMain"].resources.exclude("/MR/fonts/NotoColorEmoji-Regular.ttf")
|
|
|
|
}
|
2023-07-01 14:44:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
multiplatformResources {
|
2023-07-04 07:32:28 -05:00
|
|
|
multiplatformResourcesPackage = "chat.simplex.res"
|
2023-07-01 14:44:36 -05:00
|
|
|
// multiplatformResourcesClassName = "MR"
|
|
|
|
}
|
|
|
|
|
|
|
|
buildConfig {
|
|
|
|
forClass("BuildConfigCommon") {
|
|
|
|
buildConfigField("String", "ANDROID_VERSION_NAME", "\"${extra["android.version_name"]}\"")
|
|
|
|
buildConfigField("int", "ANDROID_VERSION_CODE", "${extra["android.version_code"]}")
|
|
|
|
buildConfigField("String", "DESKTOP_VERSION_NAME", "\"${extra["desktop.version_name"]}\"")
|
|
|
|
}
|
|
|
|
}
|