From e91af284643d5e370b0d18c384fe8de65f59d9b3 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 24 九月 2020 12:01:10 +0800
Subject: [PATCH] 2020-09-24 1.修改MQTTSDK引用方式,修复闪退问题。

---
 Android_HDL_SDK_XW/hdl_core/build.gradle |   59 ++++++++++++++++++++++-------------------------------------
 1 files changed, 22 insertions(+), 37 deletions(-)

diff --git a/Android_HDL_SDK_XW/hdl_core/build.gradle b/Android_HDL_SDK_XW/hdl_core/build.gradle
index 3c659f2..8ef2596 100644
--- a/Android_HDL_SDK_XW/hdl_core/build.gradle
+++ b/Android_HDL_SDK_XW/hdl_core/build.gradle
@@ -1,15 +1,13 @@
 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 {
@@ -20,47 +18,34 @@
     }
     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/')
-////灏哻asses.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'
-//}
+}
 

--
Gitblit v1.8.0