From 2d561326921fa5c9664b625fed2296133f893f39 Mon Sep 17 00:00:00 2001 From: Jenly Date: Fri, 11 Dec 2020 17:06:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 38 ++++++++++++------- .../updater/util/SSLSocketFactoryUtils.java | 12 +++--- versions.gradle | 4 +- 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 5615307..045c151 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![Image](app/src/main/ic_launcher-web.png) [![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/AppUpdater/master/app/release/app-release.apk) -[![JCenter](https://img.shields.io/badge/JCenter-1.0.8-46C018.svg)](https://bintray.com/beta/#/jenly/maven/app-updater) +[![JCenter](https://img.shields.io/badge/JCenter-1.0.9-46C018.svg)](https://bintray.com/beta/#/jenly/maven/app-updater) [![JitPack](https://jitpack.io/v/jenly1314/AppUpdater.svg)](https://jitpack.io/#jenly1314/AppUpdater) [![CI](https://travis-ci.org/jenly1314/AppUpdater.svg?branch=master)](https://travis-ci.org/jenly1314/AppUpdater) [![CircleCI](https://circleci.com/gh/jenly1314/AppUpdater.svg?style=svg)](https://circleci.com/gh/jenly1314/AppUpdater) @@ -42,7 +42,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 com.king.app app-updater - 1.0.8 + 1.0.9 pom @@ -50,7 +50,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 com.king.app app-dialog - 1.0.8 + 1.0.9 pom ``` @@ -59,25 +59,25 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 //----------AndroidX 版本 //app-updater - implementation 'com.king.app:app-updater:1.0.8-androidx' + implementation 'com.king.app:app-updater:1.0.9-androidx' //app-dialog - implementation 'com.king.app:app-dialog:1.0.8-androidx' + implementation 'com.king.app:app-dialog:1.0.9-androidx' //----------Android Support 版本 //app-updater - implementation 'com.king.app:app-updater:1.0.8' + implementation 'com.king.app:app-updater:1.0.9' //app-dialog - implementation 'com.king.app:app-dialog:1.0.8' + implementation 'com.king.app:app-dialog:1.0.9' ``` ### Lvy: ```lvy //app-updater - + //app-dialog - + ``` @@ -129,7 +129,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 .serUrl(mUrl) .setFilename("AppUpdater.apk") .build(getContext()) - .setHttpManager(OkHttpManager.getInstance())//使用OkHttpClient实现下载,需依赖okhttp库 + .setHttpManager(OkHttpManager.getInstance())//不设置HttpManager时,默认使用HttpsURLConnection下载,如果使用OkHttpClient实现下载,需依赖okhttp库 .start(); AppDialog.INSTANCE.dismissDialogFragment(getSupportFragmentManager()); } @@ -140,8 +140,17 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 更多使用详情,请查看[app](app)中的源码使用示例或直接查看[API帮助文档](https://jenly1314.github.io/projects/AppUpdater/doc/) +## 混淆 + +**app-updater** [Proguard rules](app-updater/proguard-rules.pro) + +**app-dialog** [Proguard rules](app-dialog/proguard-rules.pro) + ## 版本记录 +#### v1.0.9:2020-12-11 +* 优化默认Dialog样式的显示细节 + #### v1.0.8:2020-1-2 * 支持MD5校验 * 对外提供获取Dialog方法 @@ -190,12 +199,15 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 CSDN: jenly121 - CNBlog: jenly + CNBlogs: jenly + + GitHub: jenly1314 - Github: jenly1314 + Gitee: jenly1314 加入QQ群: 20867961
-
\ No newline at end of file + + diff --git a/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java b/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java index 1948c83..840d084 100644 --- a/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java +++ b/app-updater/src/main/java/com/king/app/updater/util/SSLSocketFactoryUtils.java @@ -1,6 +1,7 @@ package com.king.app.updater.util; import android.content.Context; +import androidx.annotation.RawRes; import java.io.InputStream; import java.security.KeyManagementException; @@ -20,7 +21,6 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; -import androidx.annotation.RawRes; /** * @author Jenly Jenly @@ -108,7 +108,7 @@ public final class SSLSocketFactoryUtils { return null; } //获得服务器端证书 - TrustManager[] turstManager = getTurstManager(certificates); + TrustManager[] turstManager = getTrustManager(certificates); //初始化ssl证书库 try { @@ -130,7 +130,7 @@ public final class SSLSocketFactoryUtils { * @param certificates * @return */ - public static TrustManager[] getTurstManager(InputStream... certificates) { + public static TrustManager[] getTrustManager(InputStream... certificates) { try { CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); @@ -162,15 +162,15 @@ public final class SSLSocketFactoryUtils { } - return getTurstAllManager(); + return getTrustAllManager(); } /** * 获得信任所有服务器端证书库 * */ - public static TrustManager[] getTurstAllManager() { + public static TrustManager[] getTrustAllManager() { return new X509TrustManager[] {createTrustAllManager()}; } -} \ No newline at end of file +} diff --git a/versions.gradle b/versions.gradle index 2a39a12..02d5ae2 100644 --- a/versions.gradle +++ b/versions.gradle @@ -1,7 +1,7 @@ //App def app_version = [:] -app_version.versionCode = 14 //androidx 14 -app_version.versionName = "1.0.8-androidx" +app_version.versionCode = 16 //androidx 16 +app_version.versionName = "1.0.9-androidx" ext.app_version = app_version //build version