plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" } android { compileSdk 35 defaultConfig { applicationId "com.example.iot_controlhost" minSdkVersion 25 targetSdkVersion 30 versionCode 157 versionName "3.5.0.157" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { moduleName "mcu" abiFilters "armeabi" abiFilters "armeabi-v7a" abiFilters "arm64-v8a" } resourceConfigurations += ['zh-rCN'] } packagingOptions { jniLibs { pickFirsts += ['lib/arm64-v8a/libc++_shared.so', 'lib/armeabi-v7a/libc++_shared.so'] } } signingConfigs { release { keyAlias 'store' keyPassword '123456' storeFile file('../key/store.jks') storePassword '123456' } debug { keyAlias 'store' keyPassword '123456' storeFile file('../key/store.jks') storePassword '123456' } } //引用.so文件 sourceSets { main { jniLibs.srcDirs 'libs' } } //修改生成的apk名字,格式为 app名_版本号_打包时间.apk applicationVariants.all { variant -> def type = variant.buildType.name def time = new Date().format("yyyy-MM-dd_HH-mm") if (type == 'release') { variant.outputs.all { output -> outputFileName = "BBIT智慧共育室_${versionCode}_${versionName}_${time}.apk" } } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } buildFeatures { viewBinding true dataBinding true compose true } kotlinOptions { jvmTarget = '17' } namespace 'com.example.iot_controlhost' lint { abortOnError false checkReleaseBuilds false } composeOptions { kotlinCompilerExtensionVersion rootProject.composeVersion } } apply plugin: 'com.android.application' apply plugin: 'org.greenrobot.greendao' dependencies { // Compose implementation "androidx.activity:activity-compose:$rootProject.composeVersion" implementation "androidx.compose.runtime:runtime:$rootProject.composeVersion" implementation "androidx.compose.ui:ui:$rootProject.composeVersion" implementation "androidx.compose.foundation:foundation:$rootProject.composeVersion" implementation "androidx.compose.foundation:foundation-layout:$rootProject.composeVersion" implementation "androidx.compose.material:material:$rootProject.composeVersion" implementation "androidx.compose.runtime:runtime-livedata:$rootProject.composeVersion" implementation "androidx.compose.ui:ui-tooling:$rootProject.composeVersion" implementation("androidx.compose.material3:material3:1.4.0-alpha12") implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1") implementation("io.github.ltttttttttttt:ComposeViews:1.6.0.1") implementation ("io.github.ehsannarmani:compose-charts:0.1.2") // implementation "com.google.android.material:compose-theme-adapter:$rootProject.composeVersion" implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation files('libs\\ysAPI.jar') implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.9.9' implementation 'androidx.core:core-ktx:1.10.1' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' implementation fileTree(include: ['*.jar'], dir: 'libs') implementation files('libs/json-lib-2.4-jdk15.jar') implementation files('libs/zckjAPI-2.1.jar') implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'com.android.support:support-annotations:28.0.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' //mqtt implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5' implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' //条形码 implementation 'com.google.zxing:core:3.5.0' //屏幕适配 implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1' //dataBinding implementation 'androidx.databinding:databinding-runtime:8.0.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' //util implementation 'com.blankj:utilcodex:1.31.1' //MMKV implementation 'com.tencent:mmkv:1.2.13' //网络请求库 implementation 'org.xutils:xutils:3.9.0' //流式布局 implementation 'com.google.android.flexbox:flexbox:3.0.0' //日期下拉框 implementation 'com.contrarywind:Android-PickerView:4.1.9' //greendao· implementation 'org.greenrobot:greendao:3.3.0' //日志库 implementation 'com.jakewharton.timber:timber:5.0.1' //权限库 implementation 'com.github.getActivity:XXPermissions:18.5' //图表库 implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' //GSON implementation 'com.google.code.gson:gson:2.9.0' //下拉刷新 加载更多 implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3' implementation 'com.scwang.smart:refresh-header-classics:2.0.3' //Toast implementation 'com.github.GrenderG:Toasty:1.5.2' //时间 implementation 'com.xhinliang:LunarCalendar:4.0.7' //日出日落时间计算 implementation 'com.luckycatlabs:SunriseSunsetCalculator:1.2' implementation 'me.samlss:broccoli:1.0.0' // 重启 implementation 'com.jakewharton:process-phoenix:3.0.0' // def lifecycle_version = "2.7.0" // def arch_version = "2.2.0" // // // ViewModel // implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version" // // LiveData // implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version" // // Lifecycles only (without ViewModel or LiveData) // implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" // // // Saved state module for ViewModel // implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version" // // // Annotation processor // annotationProcessor "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" // // alternately - if using Java8, use the following instead of lifecycle-compiler // implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" // // // optional - helpers for implementing LifecycleOwner in a Service // implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version" // // // optional - ProcessLifecycleOwner provides a lifecycle for the whole application process // implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version" // // // optional - ReactiveStreams support for LiveData // implementation "androidx.lifecycle:lifecycle-reactivestreams:$lifecycle_version" // // // optional - Test helpers for LiveData // testImplementation "androidx.arch.core:core-testing:$arch_version" // // // optional - Test helpers for Lifecycle runtime // testImplementation "androidx.lifecycle:lifecycle-runtime-testing:$lifecycle_version" }