2025-12-04 16:59:48 +01:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
2024-11-22 17:52:51 +01:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
2026-01-22 19:29:45 +01:00
|
|
|
import java.io.FileInputStream
|
|
|
|
|
import java.util.Properties
|
2024-08-01 00:36:05 +02:00
|
|
|
|
2024-11-19 18:44:16 +01:00
|
|
|
|
|
|
|
|
|
2026-01-22 19:29:45 +01:00
|
|
|
val keystoreProperties = Properties()
|
|
|
|
|
keystoreProperties.load(FileInputStream(rootProject.file("keystore.properties")))
|
2024-08-01 00:36:05 +02:00
|
|
|
|
2024-07-25 23:27:14 +02:00
|
|
|
plugins {
|
2026-01-22 19:29:45 +01:00
|
|
|
id("com.android.application").version("9.0.0")
|
|
|
|
|
id("org.jetbrains.kotlin.plugin.compose").version("2.3.0")
|
|
|
|
|
id("org.jetbrains.kotlin.plugin.serialization").version("2.3.0")
|
2024-07-25 23:27:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
android {
|
2026-01-22 19:29:45 +01:00
|
|
|
namespace = "com.kernelmaft.zanbur"
|
|
|
|
|
compileSdk = 36
|
2024-07-25 23:27:14 +02:00
|
|
|
|
2026-01-22 19:29:45 +01:00
|
|
|
defaultConfig {
|
|
|
|
|
applicationId = "com.kernelmaft.zanbur"
|
|
|
|
|
minSdk = 36
|
|
|
|
|
targetSdk = 36
|
|
|
|
|
versionCode = 1
|
|
|
|
|
versionName = "1.0"
|
|
|
|
|
}
|
2024-07-25 23:27:14 +02:00
|
|
|
|
2026-01-22 19:29:45 +01:00
|
|
|
signingConfigs {
|
|
|
|
|
create("kernelmaft") {
|
|
|
|
|
keyAlias = "kernelmaft"
|
|
|
|
|
keyPassword = keystoreProperties["keyPassword"] as String
|
|
|
|
|
storeFile = file(keystoreProperties["storeFile"] as String)
|
|
|
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-08-01 00:36:05 +02:00
|
|
|
|
2026-01-22 19:29:45 +01:00
|
|
|
buildTypes {
|
|
|
|
|
debug {
|
|
|
|
|
signingConfig = signingConfigs.getByName("kernelmaft")
|
|
|
|
|
}
|
|
|
|
|
release {
|
|
|
|
|
isMinifyEnabled = true
|
|
|
|
|
isShrinkResources = true
|
|
|
|
|
signingConfig = signingConfigs.getByName("kernelmaft")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
compileOptions {
|
|
|
|
|
// Required even though we don't have any Java sources because it needs to match Kotlin's JVM
|
|
|
|
|
// version.
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_25
|
|
|
|
|
}
|
|
|
|
|
buildFeatures {
|
|
|
|
|
compose = true
|
|
|
|
|
}
|
2024-07-25 23:27:14 +02:00
|
|
|
}
|
|
|
|
|
|
2025-12-04 16:59:48 +01:00
|
|
|
kotlin {
|
2026-01-22 19:29:45 +01:00
|
|
|
compilerOptions {
|
|
|
|
|
jvmTarget = JvmTarget.JVM_25
|
|
|
|
|
}
|
2025-12-04 16:59:48 +01:00
|
|
|
}
|
|
|
|
|
|
2024-07-25 23:27:14 +02:00
|
|
|
dependencies {
|
2026-01-22 19:29:45 +01:00
|
|
|
// Android runtime libraries.
|
|
|
|
|
implementation("com.google.android.material:material:1.13.0")
|
|
|
|
|
implementation("androidx.activity:activity-compose:1.12.2")
|
|
|
|
|
implementation("androidx.core:core-ktx:1.17.0")
|
|
|
|
|
implementation("androidx.compose.material3:material3:1.4.0")
|
|
|
|
|
implementation("androidx.compose.ui:ui:1.10.1")
|
|
|
|
|
implementation("androidx.compose.ui:ui-graphics:1.10.1")
|
|
|
|
|
debugImplementation("androidx.compose.ui:ui-tooling:1.10.1")
|
|
|
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.10.0")
|
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
|
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.10.0")
|
|
|
|
|
// Other libraries.
|
|
|
|
|
implementation("io.github.davidepianca98:kmqtt-common:1.0.0")
|
|
|
|
|
implementation("io.github.davidepianca98:kmqtt-client:1.0.0")
|
2024-07-25 23:27:14 +02:00
|
|
|
}
|
|
|
|
|
|
2026-01-22 19:29:45 +01:00
|
|
|
tasks.withType(KotlinCompile::class).all {
|
|
|
|
|
compilerOptions {
|
|
|
|
|
freeCompilerArgs.addAll("-opt-in=kotlin.ExperimentalUnsignedTypes")
|
|
|
|
|
}
|
2024-07-25 23:27:14 +02:00
|
|
|
}
|