| | |
| | | apply plugin: 'com.android.library' |
| | | //apply plugin: 'com.novoda.bintray-release' |
| | | |
| | | android { |
| | | compileSdkVersion 28 |
| | | defaultConfig { |
| | | minSdkVersion 17 |
| | | targetSdkVersion 28 |
| | | versionCode 2 |
| | | versionName "1.0.8" |
| | | versionCode 1 |
| | | versionName "1.0.1" |
| | | |
| | | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| | | |
| | | } |
| | | buildTypes { |
| | |
| | | } |
| | | buildToolsVersion '28.0.3' |
| | | |
| | | /** |
| | | * 打包自动命名 |
| | | */ |
| | | android.libraryVariants.all { variant -> |
| | | variant.outputs.all { |
| | | outputFileName = "HDL_ZigBeeSDK_V" + |
| | | defaultConfig.versionName + ".B" + defaultConfig.versionCode + "." + releaseTime() + ".aar" |
| | | } |
| | | } |
| | | |
| | | |
| | | // lintOptions { |
| | | // abortOnError false |
| | | // warning 'InvalidPackage' |
| | | // } |
| | | } |
| | | |
| | | dependencies { |
| | | implementation fileTree(include: ['*.jar'], dir: 'libs') |
| | | implementation 'com.android.support:appcompat-v7:28+' |
| | | api 'org.greenrobot:eventbus:3.0.0' |
| | | testImplementation 'junit:junit:4.12' |
| | | androidTestImplementation 'com.android.support.test:runner:1.0.2' |
| | | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' |
| | | implementation files('libs/org.eclipse.paho.client.mqttv3-1.2.0.jar') |
| | | def releaseTime() { |
| | | return new Date().format("yyyyMMdd") |
| | | } |
| | | |
| | | |
| | | //task makeJar(type: Copy) { |
| | | ////删除存在的 |
| | | // delete'build/libs/test.jar' |
| | | ////设置拷贝的文件 |
| | | // from('build/intermediates/packaged-classes/release/') |
| | | ////打进jar包后的文件目录 |
| | | // into('build/libs/') |
| | | ////将casses.jar放入build/libs/目录下 |
| | | ////include ,exclude参数来设置过滤 |
| | | ////(我们只关心classes.jar这个文件) |
| | | // include('classes.jar') |
| | | ////重命名 |
| | | // rename ('classes.jar','test.jar') |
| | | //} |
| | | //makeJar.dependsOn(build) |
| | | dependencies { |
| | | implementation fileTree(include: ['*.jar'], dir: 'libs') |
| | | implementation 'com.android.support:appcompat-v7:28.0.0' |
| | | api 'org.greenrobot:eventbus:3.0.0' |
| | | api 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5' |
| | | testImplementation 'junit:junit:4.12' |
| | | |
| | | |
| | | |
| | | |
| | | //publish { |
| | | // userOrg = 'tommydai' |
| | | // groupId = 'com.hdl.sdk' |
| | | // artifactId = 'hdlsdk' |
| | | // publishVersion = '1.5.8' |
| | | // desc = 'HDL core libray' |
| | | //} |
| | | } |
| | | |