75 lines
2.3 KiB
Groovy
75 lines
2.3 KiB
Groovy
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
// 👇 就加这一行
|
|
buildFeatures {
|
|
buildConfig true
|
|
}
|
|
namespace 'com.itrycn.gpsspeed'
|
|
compileSdk {
|
|
version = release(36) {
|
|
minorApiLevel = 1
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.itrycn.gpsspeed"
|
|
minSdk 26
|
|
targetSdk 36
|
|
versionCode 4
|
|
versionName "1.2.1"
|
|
buildConfigField "boolean", "PrivateSoft", "false"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
// 宏定义
|
|
//buildConfigField "boolean", "PrivateSoft", "false"
|
|
}
|
|
release {
|
|
minifyEnabled false
|
|
//buildConfigField "boolean", "PrivateSoft", "false"
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
viewBinding {
|
|
enabled = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
|
implementation "com.google.code.gson:gson:2.10.1"
|
|
implementation libs.androidx.core.ktx
|
|
implementation libs.androidx.lifecycle.runtime.ktx
|
|
implementation libs.androidx.activity.compose
|
|
implementation platform(libs.androidx.compose.bom)
|
|
implementation libs.androidx.compose.ui
|
|
implementation libs.androidx.compose.ui.graphics
|
|
implementation libs.androidx.compose.ui.tooling.preview
|
|
implementation libs.androidx.compose.material3
|
|
implementation libs.androidx.appcompat
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation libs.androidx.preference
|
|
// 分组设置界面必备
|
|
implementation libs.androidx.preference.ktx
|
|
testImplementation libs.junit
|
|
androidTestImplementation libs.androidx.junit
|
|
androidTestImplementation libs.androidx.espresso.core
|
|
androidTestImplementation platform(libs.androidx.compose.bom)
|
|
androidTestImplementation libs.androidx.compose.ui.test.junit4
|
|
debugImplementation libs.androidx.compose.ui.tooling
|
|
debugImplementation libs.androidx.compose.ui.test.manifest
|
|
|
|
} |