apply plugin: 'com.android.library' //生成aar文件配置 apply plugin: 'com.kezong.fat-aar' android { compileSdkVersion 32 defaultConfig { minSdkVersion 21 targetSdkVersion 32 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" multiDexEnabled true ndk { abiFilters "x86", "armeabi", 'armeabi-v7a', 'arm64-v8a' } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } packagingOptions { // libsdkcore.so是被加固过的,不能被压缩,否则加载动态库时会报错 doNotStrip "*/x86/libsdkcore.so" doNotStrip "*/x86_64/libsdkcore.so" doNotStrip "*/armeabi/libsdkcore.so" doNotStrip "*/armeabi-v7a/libsdkcore.so" doNotStrip "*/arm64-v8a/libsdkcore.so" } } repositories { flatDir { dirs 'libs' } } dependencies { compileOnly fileTree(dir: 'libs', include: ['*.jar']) compileOnly fileTree(dir: '../app/libs', include: ['uniapp-v8-release.aar']) implementation('org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61') implementation('com.google.code.gson:gson:2.6.2') implementation('com.alibaba:fastjson:1.1.46.android') //插件调试 //implementation(name: 'finapplet-2.36.3', ext: 'aar') //implementation(name: 'plugins-2.36.3', ext: 'aar') //implementation(name: 'map-2.36.3', ext: 'aar') //implementation(name: 'bluetooth-2.36.3', ext: 'aar') //implementation(name: 'webrtc-2.36.3', ext: 'aar') //implementation(name: 'sdkcore-2.16.1', ext: 'aar') //生成aar文件配置 implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.0.0' embed (name: 'finapplet-2.36.3', ext: 'aar') // embed(name: 'plugins-2.36.3', ext: 'aar') // //embed(name: 'map-2.36.3', ext: 'aar') // //embed(name: 'bluetooth-2.36.3', ext: 'aar') // //embed(name: 'webrtc-2.36.3', ext: 'aar') embed(name: 'sdkcore-2.16.1', ext: 'aar') }