apply plugin: 'com.android.application' apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'org.greenrobot.greendao' //apply plugin: 'kotlin-android' android { //添加这两行 aaptOptions.cruncherEnabled = false // aaptOptions.useNewCruncher = false // 签名配置 signingConfigs { debug { keyAlias rootProject.ext.base["signAlias"] keyPassword rootProject.ext.base["signPassword"] storeFile file(rootProject.ext.base["signFile"]) storePassword rootProject.ext.base["signPassword"] } release { keyAlias rootProject.ext.base["signAlias"] keyPassword rootProject.ext.base["signPassword"] storeFile file(rootProject.ext.base["signFile"]) storePassword rootProject.ext.base["signPassword"] } } compileSdkVersion 36 namespace rootProject.ext.base.applicationId // 添加这一行 defaultConfig { applicationId rootProject.ext.base.applicationId minSdkVersion 24 targetSdkVersion 36 multiDexEnabled true versionCode rootProject.ext.base.versionCode versionName rootProject.ext.base.versionName resConfigs "zh" } buildTypes { release { apply from: rootProject.file('android_data/flavors.gradle') } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } sourceSets { main { jniLibs.srcDirs = ['libs'] assets.srcDirs += ['../android_data/csj_config'] } } kotlinOptions { jvmTarget = '17' } // 添加 extractNativeLibs 配置 packagingOptions { jniLibs { useLegacyPackaging = true pickFirsts += '**/*.so' } } defaultConfig { multiDexEnabled true } } repositories { flatDir { dirs 'libs' } } greendao { schemaVersion 1 targetGenDir 'src/main/java' daoPackage 'com.tfq.finances.db' } tasks.configureEach { task -> if(task.name.matches("\\w*compile\\w*Kotlin")) { task.dependsOn('greendao') // 如果有greendao任务 } } dependencies { implementation fileTree(include: ['*.aar', '*.jar'], dir: 'libs') implementation 'androidx.constraintlayout:constraintlayout:2.1.4' api 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.core:core-ktx:1.10.1' testImplementation 'junit:junit:4.+' //---------- 友盟 start ---------- // 下面各SDK根据宿主App是否使用相关业务按需引入。 // 友盟统计SDK implementation 'com.umeng.umsdk:common:9.6.5'// 必选 implementation 'com.umeng.umsdk:asms:1.4.1'// 必选 implementation 'com.umeng.umsdk:apm:1.7.0' // 错误分析模块改为独立库,看crash和性能数据请一定集成 implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选 //---------- 友盟 end ---------- implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.28' implementation 'io.reactivex:rxjava:1.0.14' implementation 'io.reactivex:rxandroid:1.0.1' // 替代原有的 jdk7/jdk8 分离依赖 implementation "org.jetbrains.kotlin:kotlin-stdlib:2.0.0" implementation project(':BaseLibrary') // implementation fileTree(dir: '../LibraryAd/libs', include: ['*.aar']) implementation fileTree(dir: '../LibraryAdLib/libs', include: ['*.aar']) implementation project(':LibraryAd') //选择器 implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:4.1.12' //数据库 implementation 'org.greenrobot:greendao:3.3.0' }