import com.android.build.api.dsl.Packaging plugins { alias(libs.plugins.android.application) alias(libs.plugins.jetbrains.kotlin.android) alias(libs.plugins.compose.compiler) id("com.google.devtools.ksp") id("com.google.dagger.hilt.android") id("kotlin-kapt") } android { namespace = "com.bbitcn.f8.pad" compileSdk = 35 defaultConfig { applicationId = "com.bbitcn.f8.pad" minSdk = 30 targetSdk = 32 versionCode = 44 versionName = "1.0.44" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true } ndk { abiFilters.addAll(listOf("armeabi", "armeabi-v7a", "x86", "arm64-v8a")) } } signingConfigs { // create("config") { // keyAlias = "key0" // keyPassword = "123456" // storeFile = file("../key/key.jks") // storePassword = "123456" // } getByName("debug") { keyAlias = "key0" keyPassword = "123456" storeFile = file("../key/key.jks") storeType = "jks" storePassword = "123456" } } buildTypes { release { // signingConfig = signingConfigs.getByName("config") isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) } } // composeCompiler { // 强力跳过模式 // enableStrongSkippingMode = true // } compileOptions { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } kotlinOptions { jvmTarget = "21" } buildFeatures { compose = true } composeOptions { kotlinCompilerExtensionVersion = "1.5.1" } packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } } sourceSets { getByName("main") { jniLibs.srcDirs("libs") } } fun Packaging.() { resources { excludes += setOf("META-INF/DEPENDENCIES", "common.properties") } } } dependencies { // 打印机驱动CPCL_SDK_V1 // 身份证驱动zkandroidcore implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar", "*.aar")))) // NFC需要 // implementation("com.google.guava:guava:14.0") implementation("com.google.guava:guava:30.1-jre") 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.ui) implementation(libs.androidx.ui.graphics) implementation(libs.androidx.ui.tooling.preview) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) androidTestImplementation(platform(libs.androidx.compose.bom)) androidTestImplementation(libs.androidx.ui.test.junit4) debugImplementation(libs.androidx.ui.tooling) debugImplementation(libs.androidx.ui.test.manifest) implementation(libs.androidx.core.splashscreen) //lifecycle-viewmodel-compose implementation(libs.androidx.lifecycle.viewmodel.compose) implementation(libs.androidx.material.icons.extended) //MMKV implementation(libs.mmkv) //util implementation(libs.com.blankj.utilcodex2) //GSON implementation(libs.com.google.code.gson.gson2) //权限库 implementation(libs.com.github.getactivity.xxpermissions) //日志库 implementation(libs.timber) implementation(libs.androidx.legacy.legacy.support.v43) implementation(libs.androidx.navigation.compose) //日期下拉框 implementation(libs.android.pickerview) implementation("io.github.ltttttttttttt:ComposeViews:1.6.0.1") implementation("com.inuker.bluetooth:library:1.4.0") //RxJava // implementation("io.reactivex.rxjava2:rxjava:2.2.20") // implementation("io.reactivex.rxjava2:rxandroid:2.1.1") // implementation("com.jakewharton.rxbinding2:rxbinding:2.2.0") // implementation("com.github.xuexiangjys:RxUtil2:1.2.1") // MD3 implementation("androidx.compose.material3:material3:1.4.0-alpha12") // implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.5") //gson implementation("com.google.code.gson:gson:2.9.0") implementation("com.squareup.retrofit2:retrofit:2.11.0") implementation("com.squareup.retrofit2:converter-gson:2.11.0") implementation("com.google.dagger:hilt-android:2.52") kapt("com.google.dagger:hilt-compiler:2.52") implementation("androidx.hilt:hilt-navigation-compose:1.0.0") implementation("com.github.devnied.emvnfccard:library:3.0.1") // 日历 implementation("com.xhinliang:LunarCalendar:4.0.7") // 网络图片加载 implementation("io.coil-kt.coil3:coil-compose:3.0.4") implementation("io.coil-kt.coil3:coil-network-okhttp:3.0.4") // Paging3 val paging_version = "3.3.2" implementation("androidx.paging:paging-runtime:$paging_version") // optional - Jetpack Compose integration implementation("androidx.paging:paging-compose:$paging_version") // 阿里云接口 implementation("com.aliyun:ocr_api20210707:3.1.2") // CameraX core library using the camera2 implementation val camerax_version = "1.5.0-alpha04" // The following line is optional, as the core library is included indirectly by camera-camera2 implementation("androidx.camera:camera-core:${camerax_version}") implementation("androidx.camera:camera-compose:${camerax_version}") implementation("androidx.camera:camera-camera2:${camerax_version}") // If you want to additionally use the CameraX Lifecycle library implementation("androidx.camera:camera-lifecycle:${camerax_version}") // If you want to additionally use the CameraX VideoCapture library implementation("androidx.camera:camera-video:${camerax_version}") // If you want to additionally use the CameraX View class implementation("androidx.camera:camera-view:${camerax_version}") // If you want to additionally add CameraX ML Kit Vision Integration implementation("androidx.camera:camera-mlkit-vision:${camerax_version}") // If you want to additionally use the CameraX Extensions library implementation("androidx.camera:camera-extensions:${camerax_version}") // implementation("androidx.camera.viewfinder:viewfinder-compose:${camerax_version}") // implementation("androidx.camera:camera-viewfinder-compose:1.0.0-alpha02") // 串口-超高频读卡器 api("com.licheedev:android-serialport:2.1.3") // 条形码 implementation("com.google.zxing:core:3.5.3") // 人脸识别 7M implementation("com.google.mlkit:face-detection:16.1.7") // 阿里云OSS // implementation("com.aliyun.oss:aliyun-sdk-oss:3.18.1") implementation("com.aliyun.dpa:oss-android-sdk:2.9.21") // USB驱动 implementation("com.github.mik3y:usb-serial-for-android:3.8.1") // 日期时间选择器 implementation("com.github.commandiron:WheelPickerCompose:1.1.11") // 图表组件 implementation("io.github.ehsannarmani:compose-charts:0.1.2") }