124 lines
3.8 KiB
Kotlin
124 lines
3.8 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
id("kotlin-android")
|
|
id("kotlin-kapt")
|
|
id("kotlin-parcelize")
|
|
id("com.google.dagger.hilt.android")
|
|
id("dagger.hilt.android.plugin")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.github.droidworksstudio.launcher"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "app.easy.launcher"
|
|
minSdk = 24
|
|
targetSdk = 34
|
|
versionCode = 12
|
|
versionName = "0.1.2"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
getByName("debug") {
|
|
isMinifyEnabled = false
|
|
isShrinkResources = false
|
|
isDebuggable = true
|
|
applicationIdSuffix = ".debug"
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
resValue("string", "app_name", "Easy Launcher (Debug)")
|
|
resValue("string", "settings_backups_file", "autoBackup.debug.ini")
|
|
}
|
|
|
|
getByName("release") {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
resValue("string", "app_name", "Easy Launcher")
|
|
resValue("string", "settings_backups_file", "autoBackup.ini")
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
viewBinding = true
|
|
dataBinding = true
|
|
buildConfig = true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.14"
|
|
}
|
|
|
|
applicationVariants.all {
|
|
if (buildType.name == "release") {
|
|
outputs.all {
|
|
val output = this as? com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
|
if (output?.outputFileName?.endsWith(".apk") == true) {
|
|
output.outputFileName =
|
|
"${defaultConfig.applicationId}_v${defaultConfig.versionName}-Signed.apk"
|
|
}
|
|
}
|
|
}
|
|
if (buildType.name == "debug") {
|
|
outputs.all {
|
|
val output = this as? com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
|
if (output?.outputFileName?.endsWith(".apk") == true) {
|
|
output.outputFileName =
|
|
"${defaultConfig.applicationId}_v${defaultConfig.versionName}-Debug.apk"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation(libs.core.ktx)
|
|
implementation(libs.appcompat)
|
|
implementation(libs.material)
|
|
implementation(libs.constraintlayout)
|
|
implementation(libs.navigation.fragment.ktx)
|
|
implementation(libs.navigation.ui.ktx)
|
|
implementation(libs.lifecycle.runtime.ktx)
|
|
implementation(libs.lifecycle.process)
|
|
implementation(libs.lifecycle.viewmodel.ktx)
|
|
implementation(libs.work.runtime.ktx)
|
|
implementation(libs.recyclerview)
|
|
implementation(libs.preference)
|
|
implementation(libs.biometric.ktx)
|
|
implementation(libs.room.ktx)
|
|
implementation(libs.room.runtime)
|
|
implementation(libs.androidx.runtime.android)
|
|
implementation(libs.androidx.ui.android)
|
|
|
|
//noinspection KaptUsageInsteadOfKsp
|
|
kapt(libs.room.compiler)
|
|
implementation(libs.dagger.hilt.android)
|
|
kapt(libs.dagger.hilt.compiler)
|
|
implementation(libs.color.chooser)
|
|
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
}
|