gkd/app/build.gradle.kts

118 lines
3.7 KiB
Plaintext
Raw Normal View History

2021-11-19 14:08:52 +08:00
plugins {
id("com.android.application")
id("kotlin-android")
2021-12-14 11:34:20 +08:00
id("kotlin-kapt")
2021-11-19 14:08:52 +08:00
}
val composeVersion = "1.0.5"
android {
2021-11-19 14:28:49 +08:00
compileSdk = 31
buildToolsVersion = "31.0.0"
2021-11-19 14:08:52 +08:00
defaultConfig {
2021-12-14 11:34:20 +08:00
applicationId = "li.songe.gkd"
2021-11-19 14:28:49 +08:00
minSdk = 26
targetSdk = 31
2021-11-19 14:08:52 +08:00
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
2021-11-19 14:28:49 +08:00
signingConfigs {
create("release") {
storeFile = file("./android.jks")
storePassword = "KdMQ6pqiNSJ6Sype"
keyAlias = "key0"
keyPassword = "KdMQ6pqiNSJ6Sype"
}
}
2021-11-19 14:08:52 +08:00
buildTypes {
2021-11-19 14:28:49 +08:00
release {
isMinifyEnabled = false
setProguardFiles(
listOf(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
)
signingConfig = signingConfigs.getByName("release")
2021-12-14 11:34:20 +08:00
manifestPlaceholders["appName"] = "搞快点"
2021-11-19 14:28:49 +08:00
}
debug {
applicationIdSuffix = ".debug"
2021-12-14 11:34:20 +08:00
manifestPlaceholders["appName"] = "搞快点-dev"
2021-11-19 14:08:52 +08:00
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
2021-11-19 14:28:49 +08:00
compose = true
2021-11-19 14:08:52 +08:00
}
composeOptions {
kotlinCompilerExtensionVersion = composeVersion
}
packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
2021-12-14 11:34:20 +08:00
// normal
2021-11-19 14:08:52 +08:00
implementation("androidx.appcompat:appcompat:1.4.0")
implementation("com.google.android.material:material:1.4.0")
2021-12-14 11:34:20 +08:00
// ktx
implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.0")
// compose
2021-11-19 14:08:52 +08:00
implementation("androidx.compose.ui:ui:$composeVersion")
implementation("androidx.compose.material:material:$composeVersion")
implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")
2021-12-14 11:34:20 +08:00
debugImplementation("androidx.compose.ui:ui-tooling:$composeVersion")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$composeVersion")
2021-11-19 14:08:52 +08:00
implementation("androidx.activity:activity-compose:1.4.0")
2021-12-14 11:34:20 +08:00
implementation("androidx.navigation:navigation-compose:2.4.0-beta02")
// test
2021-11-19 14:08:52 +08:00
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
// https://github.com/RikkaApps/Shizuku-API
2021-12-14 11:34:20 +08:00
val shizukuVersion = "12.1.0"
implementation("dev.rikka.shizuku:api:$shizukuVersion")
implementation("dev.rikka.shizuku:provider:$shizukuVersion")
2021-11-19 14:08:52 +08:00
// 工具集合类
// https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README-CN.md
implementation("com.blankj:utilcodex:1.30.6")
2021-12-14 11:34:20 +08:00
// https://developer.android.com/jetpack/compose/navigation
implementation("androidx.navigation:navigation-compose:2.4.0-beta02")
// https://bugly.qq.com/docs/user-guide/instruction-manual-android/
implementation("com.tencent.bugly:crashreport:4.0.0")
// https://developer.android.google.cn/training/data-storage/room?hl=zh-cn
val roomVersion = "2.3.0"
implementation("androidx.room:room-runtime:$roomVersion")
kapt("androidx.room:room-compiler:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion")
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation ("com.google.code.gson:gson:2.8.9")
2021-11-19 14:08:52 +08:00
}