127 lines
4.0 KiB
Kotlin
127 lines
4.0 KiB
Kotlin
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
id("com.google.devtools.ksp") version "2.0.21-1.0.27"
|
|
}
|
|
|
|
android {
|
|
namespace = "com.shuwei.dish.match"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "com.shuwei.dish.match"
|
|
minSdk = 29
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
ndk {
|
|
//设置支持的SO库架构
|
|
abiFilters.addAll(listOf("armeabi", "armeabi-v7a"))
|
|
//, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
|
|
}
|
|
|
|
resConfigs("sw800dp")
|
|
}
|
|
signingConfigs {
|
|
create("debug_507") {
|
|
storeFile = file("../system.keystore")
|
|
storePassword = "android"
|
|
keyAlias = "wabon"
|
|
keyPassword = "android"
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = signingConfigs.getByName("debug_507")
|
|
}
|
|
debug {
|
|
//507扫码秤主板在android.buildTypes{}内增加
|
|
signingConfig = signingConfigs.getByName("debug_507")
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
buildFeatures {
|
|
viewBinding = true
|
|
}
|
|
packagingOptions {
|
|
pickFirst("lib/armeabi-v7a/libserial_port.so")
|
|
pickFirst("lib/arme64-v8a/libserial_port.so")
|
|
}
|
|
sourceSets {
|
|
named("main") {
|
|
res.setSrcDirs(
|
|
listOf(
|
|
"src/main/res",
|
|
"src/main/res/layout-sw800dp"
|
|
)
|
|
)
|
|
}
|
|
}
|
|
lint {
|
|
disable.add("MissingDefaultResource")
|
|
}
|
|
// productFlavors {
|
|
// create("sw800dp") {
|
|
// dimension = "screen"
|
|
//// resConfigs("en", "xxhdpi") // 可选额外配置
|
|
// }
|
|
// }
|
|
}
|
|
|
|
dependencies {
|
|
implementation(fileTree("libs") { include("*.jar", "*.aar") })
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.appcompat)
|
|
implementation(libs.material)
|
|
implementation(libs.androidx.gridlayout)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
|
|
implementation("com.squareup.okhttp3:okhttp:4.9.1")
|
|
implementation("com.google.code.gson:gson:2.10.1")
|
|
// implementation("com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30")
|
|
|
|
implementation("io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.2")
|
|
|
|
implementation("androidx.room:room-runtime:2.5.2")
|
|
ksp("androidx.room:room-compiler:2.5.2")
|
|
implementation("androidx.room:room-ktx:2.5.2") // Kotlin扩展
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
|
|
implementation("androidx.activity:activity-ktx:1.8.0")
|
|
|
|
// implementation("biz.laenger.android:vpbs:0.0.6")
|
|
|
|
//必须 1.0.0 以上
|
|
implementation("io.github.scwang90:refresh-layout-kernel:3.0.0-alpha")
|
|
//核心必须依赖
|
|
implementation("io.github.scwang90:refresh-header-classics:3.0.0-alpha")
|
|
//经典刷新头
|
|
implementation("io.github.scwang90:refresh-header-radar:3.0.0-alpha")
|
|
// //雷达刷新头
|
|
// implementation("io.github.scwang90:refresh-header-falsify:3.0.0-alpha")
|
|
// //虚拟刷新头
|
|
// implementation("io.github.scwang90:refresh-header-material:3.0.0-alpha")
|
|
// //谷歌刷新头
|
|
// implementation("io.github.scwang90:refresh-header-two-level:3.0.0-alpha")
|
|
// //二级刷新头
|
|
// implementation("io.github.scwang90:refresh-footer-ball:3.0.0-alpha")
|
|
//球脉冲加载
|
|
implementation("io.github.scwang90:refresh-footer-classics:3.0.0-alpha")
|
|
//经典加载
|
|
} |