Bläddra i källkod

## [1.0.2] version 3 - 2020-07-03
### Changed
- 优化升级,已经在升级时,不再处理升级事件

allen 4 år sedan
förälder
incheckning
3053a9e20d

+ 14 - 256
build.gradle

@@ -1,248 +1,3 @@
-//buildscript {
-//    /**
-//     * Kotlin统一版本
-//     */
-//    ext.kotlin_version = '1.3.21'
-//
-//    /**
-//     * Aop编制版本
-//     */
-//    ext.aspectj_version = '1.8.9'
-//
-//    /**
-//     * 是否开启单独Module编译
-//     */
-//    ext.componentTag = false
-//
-//    /**
-//     * 路由注解处理器版本
-//     */
-//    ext.router_version = '1.0.2'
-//
-//    /**
-//     * kawo组件化框架版本
-//     */
-//    ext.kawo_version = '1.0.9'
-//
-//    /**
-//     * SDK最小支持版本
-//     */
-//    ext.min_sdk_version = 26
-//
-//    /**
-//     * SDK目标支持版本
-//     */
-//    ext.target_sdk_version = 28
-//
-//    /**
-//     * SDK编译版本
-//     */
-//    ext.build_tools_version = "26.0.2"
-//
-//    /**
-//     * 支持库版本
-//     */
-//    ext.support_library_version = "26.0.1"
-//
-//    /**
-//     * APP版本码
-//     */
-//    ext.app_version_code = 1
-//
-//    /**
-//     * APP版本号
-//     */
-//    ext.app_version = "1.0"
-//
-//    /**
-//     * 项目依赖库
-//     */
-//    dependencies {
-//        repositories {
-//            /**
-//             * 依赖仓储
-//             */
-//            maven { url 'https://maven.aliyun.com/repository/public' }
-//            maven { url 'https://maven.aliyun.com/repository/google'}
-//            maven { url 'https://jitpack.io' }
-//        }
-//        /**
-//         * Gradle插件
-//         */
-//        classpath 'com.android.tools.build:gradle:3.0.1'
-//
-//        /**
-//         * Kawo组件化插件
-//         */
-//        classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
-//
-//        /**
-//         * KotlinGradle插件
-//         */
-//        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-//
-//        /**
-//         * Kotlin辅助工具
-//         */
-//        classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
-//
-//        /**
-//         * Aop埋点相关
-//         */
-//        classpath "org.aspectj:aspectjtools:$aspectj_version"
-//    }
-//    repositories {
-//        mavenCentral()
-//    }
-//}
-///**
-// * 统一依赖仓储
-// */
-//allprojects {
-//    repositories {
-//        maven { url 'https://maven.aliyun.com/repository/public' }
-//        maven { url 'https://maven.aliyun.com/repository/google'}
-//        maven { url 'https://jitpack.io' }
-//    }
-//    tasks.withType(Javadoc) { // 新增
-//        options.addStringOption('Xdoclint:none', '-quiet')
-//        options.addStringOption('encoding', 'UTF-8')
-//    }
-//}
-//
-///**
-// *  清除Build配置时 删除根目录Build文件夹
-// */
-//task clean(type: Delete) {
-//    delete rootProject.buildDir
-//}
-
-//buildscript {
-//    /**
-//     * Kotlin统一版本
-//     */
-//    ext.kotlin_version = '1.3.21'
-//
-//    /**
-//     * Aop编制版本
-//     */
-//    ext.aspectj_version = '1.8.9'
-//
-//    /**
-//     * 是否开启单独Module编译
-//     */
-//    ext.componentTag = false
-//
-//    /**
-//     * 路由注解处理器版本
-//     */
-//    ext.router_version = '1.0.2'
-//
-//    /**
-//     * kawo组件化框架版本
-//     */
-//    ext.kawo_version = '1.0.9'
-//
-//    /**
-//     * SDK最小支持版本
-//     */
-//    ext.min_sdk_version = 17
-//
-//    /**
-//     * SDK目标支持版本
-//     */
-//    ext.target_sdk_version = 28
-//
-//    /**
-//     * SDK编译版本
-//     */
-//    ext.build_tools_version = "26.0.2"
-//
-//    /**
-//     * 支持库版本
-//     */
-//    ext.support_library_version = "26.0.1"
-//
-//    /**
-//     * APP版本码
-//     */
-//    ext.app_version_code = 1
-//
-//    /**
-//     * APP版本号
-//     */
-//    ext.app_version = "1.0"
-//
-//    /**
-//     * 项目依赖库
-//     */
-//    dependencies {
-//        repositories {
-//            jcenter()
-//            mavenCentral()
-//            google()
-//            /**
-//             * 依赖仓储
-//             */
-//            maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
-//            maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
-//            maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
-//            maven { url 'https://jitpack.io' }
-//        }
-//        /**
-//         * Gradle插件
-//         */
-//        classpath 'com.android.tools.build:gradle:3.0.1'
-//
-//        /**
-//         * Kawo组件化插件
-//         */
-//        classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
-//
-//        /**
-//         * KotlinGradle插件
-//         */
-//        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-//
-//        /**
-//         * Kotlin辅助工具
-//         */
-//        classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
-//
-//        /**
-//         * Aop埋点相关
-//         */
-//        classpath "org.aspectj:aspectjtools:$aspectj_version"
-//    }
-//}
-///**
-// * 统一依赖仓储
-// */
-//allprojects {
-//    repositories {
-//        jcenter()
-//        mavenCentral()
-//        google()
-//
-//        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
-//        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
-//        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
-//        maven { url 'https://jitpack.io' }
-//    }
-//    tasks.withType(Javadoc) { // 新增
-//        options.addStringOption('Xdoclint:none', '-quiet')
-//        options.addStringOption('encoding', 'UTF-8')
-//    }
-//}
-//
-///**
-// *  清除Build配置时 删除根目录Build文件夹
-// */
-//task clean(type: Delete) {
-//    delete rootProject.buildDir
-//}
-
-
 buildscript {
     /**
      * Kotlin统一版本
@@ -292,12 +47,12 @@ buildscript {
     /**
      * APP版本码
      */
-    ext.app_version_code = 1
+    ext.app_version_code = 3
 
     /**
      * APP版本号
      */
-    ext.app_version = "1.0"
+    ext.app_version = "1.0.3"
 
     /**
      * 项目依赖库
@@ -307,9 +62,10 @@ buildscript {
             /**
              * 依赖仓储
              */
-            jcenter()
-            mavenCentral()
-            google()
+            maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
+            maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
+            maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
+            maven { url 'https://jitpack.io' }
         }
         /**
          * Gradle插件
@@ -337,7 +93,10 @@ buildscript {
         classpath "org.aspectj:aspectjtools:$aspectj_version"
     }
     repositories {
-        google()
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
+        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
+        maven { url 'https://jitpack.io' }
     }
 }
 /**
@@ -345,12 +104,11 @@ buildscript {
  */
 allprojects {
     repositories {
-        jcenter()
-        mavenCentral()
-        google()
-
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
+        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
+        maven { url 'https://jitpack.io' }
         maven { url 'https://dl.bintray.com/geamtear/maven' }
-        maven { url "https://jitpack.io" }
 
     }
     tasks.withType(Javadoc) { // 新增

+ 8 - 3
home/src/main/code/com/wdkl/ncs/android/component/home/service/TcpHandleService.kt

@@ -27,6 +27,8 @@ import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
 
 class TcpHandleService : Service(){
+    var isUpdating : Boolean = false
+
     override fun onBind(intent: Intent?): IBinder? {
         TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
     }
@@ -128,9 +130,12 @@ class TcpHandleService : Service(){
             Util.wakeUpAndUnlock(this)
             var tcpModel = messageEvent.getMessage() as TcpModel
             if (tcpModel.action == TcpAction.DeviceAction.APP_UPDATE) {
-                var intent = Intent()
-                intent.setClass(this, AppUpdateActivity::class.java)
-                startActivity(intent)
+                if (!isUpdating) {
+                    var intent = Intent()
+                    intent.setClass(this, AppUpdateActivity::class.java)
+                    isUpdating = true
+                    startActivity(intent)
+                }
             }
         }
     }

+ 4 - 0
readme.md

@@ -25,6 +25,10 @@
 在发布新版本时,可以直接将Unreleased区块中的内容移动至新发 布版本的描述区块就可以了
 
 ---
+## [1.0.2] version 3 - 2020-07-03
+### Changed
+- 优化升级,已经在升级时,不再处理升级事件
+---
 ## [1.0.1] version 2 - 2020-07-03
 ### Added
 - 等待通话界面常亮