zanbur/app/build.gradle.kts

81 lines
2.2 KiB
Kotlin

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.FileInputStream
import java.util.Properties
val keystoreProperties = Properties ()
keystoreProperties . load ( FileInputStream ( rootProject . file ("keystore.properties") ) )
plugins {
alias ( libs . plugins . android . application )
alias ( libs . plugins . kotlin . android )
alias ( libs . plugins . kotlin . compose )
alias ( libs . plugins . kotlin . serialization )
}
android {
namespace = "com.kernelmaft.zanbur"
compileSdk = 34
defaultConfig {
applicationId = "com.kernelmaft.zanbur"
minSdk = 31
targetSdk = 34
versionCode = 1
versionName = "1.0"
}
signingConfigs {
create ("kernelmaft") {
keyAlias = "kernelmaft"
keyPassword = keystoreProperties ["keyPassword"] as String
storeFile = file ( keystoreProperties ["storeFile"] as String )
storePassword = keystoreProperties ["storePassword"] as String
}
}
buildTypes {
debug {
signingConfig = signingConfigs . getByName ("kernelmaft")
}
release {
isMinifyEnabled = true
isShrinkResources = true
signingConfig = signingConfigs . getByName ("kernelmaft")
}
}
compileOptions {
targetCompatibility = JavaVersion . VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
buildFeatures {
compose = true
}
}
dependencies {
// Runtime libraries
implementation ( libs . android . material )
implementation ( libs . androidx . activity . compose )
implementation ( libs . androidx . core . ktx )
implementation ( libs . androidx . compose . material3 )
implementation ( libs . androidx . compose . ui )
implementation ( libs . androidx . compose . ui . graphics )
debugImplementation ( libs . androidx . compose . ui . tooling )
implementation ( libs . androidx . datastore . preferences )
implementation ( libs . androidx . lifecycle . runtime . ktx )
implementation ( libs . kotlinx . coroutines . android )
implementation ( libs . kotlinx . serialization . json )
// Other libraries
implementation ( libs . kmqtt . common )
implementation ( libs . kmqtt . client )
}
tasks . withType ( KotlinCompile :: class ) . all {
compilerOptions {
freeCompilerArgs . addAll ("-opt-in=kotlin.ExperimentalUnsignedTypes")
}
}