117 lines
4.0 KiB
Groovy
117 lines
4.0 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
id 'kotlin-parcelize'
|
|
}
|
|
|
|
android {
|
|
namespace 'com.eternaljust.msea'
|
|
compileSdk 33
|
|
|
|
defaultConfig {
|
|
applicationId "com.eternaljust.msea"
|
|
minSdk 29
|
|
targetSdk 33
|
|
versionCode 18
|
|
versionName "1.0.9"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary true
|
|
}
|
|
|
|
ndk {
|
|
abiFilters "arm64-v8a"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
// 混淆
|
|
minifyEnabled true
|
|
// 自动移除未使用的资源
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion '1.4.3'
|
|
}
|
|
packagingOptions {
|
|
resources {
|
|
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
|
}
|
|
dex {
|
|
// 当 minSdk 为 28 或更高级别时,开启后 AGP 会在 APK 中打包压缩的 DEX 文件
|
|
useLegacyPackaging true
|
|
}
|
|
}
|
|
sourceSets {
|
|
main {
|
|
res {
|
|
srcDirs 'src/main/res', 'src/main/res/drawble-night', 'src/main/res/drawable-night'
|
|
}
|
|
}
|
|
}
|
|
|
|
android.applicationVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
output.outputFileName = "Msea_" + variant.versionName + ".apk"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// jetpack
|
|
implementation 'androidx.core:core-ktx:1.9.0'
|
|
implementation 'androidx.core:core-splashscreen:1.0.0'
|
|
implementation 'androidx.datastore:datastore-preferences:1.0.0'
|
|
|
|
// compose
|
|
implementation "androidx.compose.ui:ui:$compose_version"
|
|
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
|
implementation 'androidx.compose.material3:material3:1.0.1'
|
|
|
|
implementation 'androidx.activity:activity-compose:1.7.0'
|
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1'
|
|
implementation 'androidx.navigation:navigation-compose:2.5.3'
|
|
implementation 'androidx.paging:paging-runtime-ktx:3.1.1'
|
|
implementation 'androidx.paging:paging-compose:1.0.0-alpha18'
|
|
|
|
implementation "com.google.accompanist:accompanist-pager:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-webview:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-permissions:$accompanist_version"
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
|
|
|
// vendor
|
|
implementation 'org.jsoup:jsoup:1.15.4'
|
|
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
|
|
implementation 'io.coil-kt:coil-compose:2.2.2'
|
|
implementation 'com.marosseleng.android:compose-material3-datetime-pickers:0.1.1'
|
|
|
|
// SDK
|
|
implementation 'com.umeng.umsdk:common:9.6.3' // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
|
|
implementation 'com.umeng.umsdk:asms:1.8.0' // 必选
|
|
implementation 'com.umeng.umsdk:apm:1.9.2' // U-APM产品包依赖(必选)
|
|
implementation 'com.umeng.umsdk:abtest:1.0.1' // 使用U-App中ABTest能力,可选
|
|
|
|
// debug
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
|
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
|
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
|
|
} |