12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- apply plugin: 'com.android.application'
- apply plugin: 'com.jakewharton.butterknife'
- android {
- compileSdkVersion 31
- defaultConfig {
- applicationId "aicare.net.cn.sdk.ailinksdkdemoandroid"
- minSdkVersion 19
- targetSdkVersion 31
- versionName "1.11.9"
- versionCode getVersionCodeNumber(versionName)
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
-
- compileOptions {
- sourceCompatibility '1.8'
- targetCompatibility '1.8'
- }
-
- repositories {
- flatDir {
- dirs 'libs'
- }
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
-
- }
- static def getVersionCodeNumber(String versionName) {
- //1.49.13_beta05
- int code=0
- if (versionName!=null){
- String versionCodeStr=versionName+"80"
- if (versionName.contains("_")){
- String[] versionStr=versionName.split("_")
- versionCodeStr=versionStr[0]+"."+versionStr[1].substring(4)
- }
- String[] versionCodes=versionCodeStr.split("\\.")
- for(int i=0;i<versionCodes.length;i++){
- String version=versionCodes[i]
- if (version.length()<=1){
- version="0"+version;
- }
- versionCodes[i]=version
- }
- String versionAllStr=""
- for (String version:versionCodes){
- versionAllStr+=version
- }
- code= (versionAllStr).toInteger()
- }
- return code
- }
-
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.4.2'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- testImplementation 'junit:junit:4.12'
- implementation 'com.github.elinkthings:AILinkSDKRepositoryAndroid:1.13.11'//蓝牙核心库
- implementation 'com.github.elinkthings:AILinkSDKOtaLibraryAndroid:1.0.3'//OTA库,需要依赖核心库
- implementation 'com.github.elinkthings:AILinkSDKParsingLibraryAndroid:1.8.4'//蓝牙解析库
- implementation 'androidx.recyclerview:recyclerview:1.2.1'
- implementation 'com.jakewharton:butterknife:10.2.0'
- annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
- api 'com.squareup.retrofit2:converter-gson:2.5.0'
- // implementation (name: 'modulelibrary-release', ext: 'aar')
- }
|