plugins { id 'com.android.library' id 'kotlin-android' id 'com.kezong.fat-aar' } android { namespace 'vinno.sportinspect.sdk' compileSdkVersion 33 defaultConfig { minSdkVersion 21 targetSdkVersion 33 versionCode 100 versionName "1.0.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { //选择要添加的对应cpu类型的.so库。 //moduleName "serial_port" // abiFilters 'armeabi-v7a','arm64-v8a' abiFilters 'armeabi", "armeabi-v7a", "arm64-v8a' // 还可以添加 'x86', 'x86_64', 'mips', 'mips64' } } repositories { flatDir { dirs 'libs' } } sourceSets { main { jni.srcDirs = [] jniLibs.srcDirs = ['src/main/jniLibs'] } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' debuggable true } // debug { // //混淆 // minifyEnabled false // //加载默认的混淆配置文件 // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' // } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildFeatures { viewBinding true } splits { // 基于不同的abi架构配置不同的apk abi { // 必须为true,打包才会为不同的abi生成不同的apk enable false // 默认情况下,包含了所有的ABI。 // 所以使用reset()清空所有的ABI,再使用include指定我们想要生成的架构armeabi-v7a、arm-v8a reset() // 逗号分隔列表的形式指定 Gradle 应针对哪些 ABI 生成 APK。只与 reset() 结合使用,以指定确切的 ABI 列表。 //include "armeabi-v7a", "arm64-v8a" include 'armeabi', 'armeabi-v7a', 'arm64-v8a' // 是否生成通用的apk,也就是包含所有ABI的apk。如果设为 true,那么除了按 ABI 生成的 APK 之外,Gradle 还会生成一个通用 APK。 universalApk true } } ndkVersion '20.0.5594570' } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation(name: 'ecgsdk_library', ext: 'aar') // implementation(name: 'empble', ext: 'aar') // implementation fileTree(dir: 'libs', include: ['*.aar']) //noinspection GradleCompatible implementation 'com.android.support:gridlayout-v7:25.+' implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.6.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'org.greenrobot:eventbus:3.1.1' implementation project(path: ':vivachek_protocol_lib') implementation files('libs\\dom4j-1.6.1.jar') testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test:core:1.4.1-alpha03' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' androidTestImplementation 'androidx.test:runner:1.4.1-alpha03' androidTestImplementation 'org.hamcrest:hamcrest-integration:1.3'//断言工具 implementation "androidx.core:core-ktx:1.7.0" implementation 'androidx.fragment:fragment:1.4.0-alpha04' implementation 'androidx.activity:activity:1.3.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" //打包aar用 embed ('org.apache.commons:commons-lang3:3.7') embed ('com.google.code.gson:gson:2.8.9') // Log embed('com.orhanobut:logger:2.2.0') //embed('com.github.Jasonchenlijian:FastBle:2.4.0') //调用用 implementation ('org.apache.commons:commons-lang3:3.7') implementation ('com.google.code.gson:gson:2.8.9') // Log implementation('com.orhanobut:logger:2.2.0') //implementation('com.github.Jasonchenlijian:FastBle:2.4.0') }