DnDApplication/app/build.gradle.kts

146 lines
4.7 KiB
Kotlin

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.dagger.hilt.android")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
id("org.jetbrains.kotlin.kapt")
id("com.google.devtools.ksp")
}
android {
namespace = "com.pixelized.rplexicon"
compileSdk = 33
signingConfigs {
getByName("debug") {
storeFile = file("../debug.keystore")
storePassword = "123456"
keyAlias = "debug"
keyPassword = "123456"
}
create("pixelized") {
storeFile = (project.properties["PIXELIZED_RELEASE_STORE_FILE"] as? String)?.let { file(it) }
storePassword = project.properties["PIXELIZED_RELEASE_STORE_PASSWORD"] as? String
keyAlias = project.properties["PIXELIZED_RELEASE_KEY_ALIAS"] as? String
keyPassword = project.properties["PIXELIZED_RELEASE_KEY_PASSWORD"] as? String
}
}
defaultConfig {
applicationId = "com.pixelized.rplexicon"
minSdk = 26
targetSdk = 33
versionCode = gitBuildNumber
versionName = "0.2.3"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
debug {
applicationIdSuffix = ".dev"
isDebuggable = true
isMinifyEnabled = false
signingConfig = signingConfigs.getByName("debug")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
release {
isDebuggable = false
isMinifyEnabled = true
signingConfig = signingConfigs.getByName("pixelized")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
buildConfig = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.8"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
lint {
lintConfig = file("$rootDir/lint-config.xml")
}
}
dependencies {
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.activity:activity-compose:1.7.2")
// Compose
implementation("androidx.compose.ui:ui:1.4.3")
implementation("androidx.compose.ui:ui-util:1.4.3")
implementation("androidx.compose.ui:ui-graphics:1.4.3")
implementation("androidx.compose.ui:ui-tooling-preview:1.4.3")
implementation("androidx.compose.material:material:1.4.3")
implementation("androidx.compose.material3:material3:1.1.1")
debugImplementation("androidx.compose.ui:ui-tooling:1.4.3")
// Accompanist
implementation("com.google.accompanist:accompanist-navigation-animation:0.30.1")
implementation("com.google.accompanist:accompanist-placeholder:0.30.1")
// Splash Screen support prior to Android 12
implementation("androidx.core:core-splashscreen:1.0.1")
// Google service
implementation("com.google.android.gms:play-services-auth:20.6.0")
implementation(
dependencyNotation = "com.google.api-client:google-api-client-android:1.23.0",
dependencyConfiguration = { exclude("org.apache.httpcomponents") },
)
implementation(
dependencyNotation = "com.google.apis:google-api-services-sheets:v4-rev20220927-2.0.0",
dependencyConfiguration = { exclude("org.apache.httpcomponents") },
)
// Import the BoM for the Firebase platform
implementation(platform("com.google.firebase:firebase-bom:32.2.0"))
implementation("com.google.firebase:firebase-crashlytics-ktx")
implementation("com.google.firebase:firebase-analytics-ktx")
// Hilt: Dependency injection
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
implementation("com.google.dagger:hilt-android:2.45")
kapt("com.google.dagger:hilt-compiler:2.45")
// Image
implementation("com.github.skydoves:landscapist-glide:2.1.11")
ksp("com.github.bumptech.glide:ksp:4.14.2") // this have to be align with landscapist-glide
}
val gitBuildNumber: Int
get() {
val stdout = org.apache.commons.io.output.ByteArrayOutputStream()
rootProject.exec {
commandLine("git", "rev-list", "--count", "HEAD")
standardOutput = stdout
}
return stdout.toString().trim().toInt()
}