### 2022-05-16 V1.1版本
- *.将greendao排除混淆,解决了release会停止运行的问题。
This commit is contained in:
parent
e0d94e2a9a
commit
f18250b88d
|
@ -1,3 +1,7 @@
|
|||
### 2022-05-14 V1.0版本
|
||||
### 2022-05-16 V1.1版本
|
||||
|
||||
- *.将greendao排除混淆,解决了release会停止运行的问题。
|
||||
|
||||
### 2022-05-14 V1.0版本
|
||||
|
||||
- *.初始版本
|
|
@ -96,5 +96,10 @@
|
|||
<option name="name" value="maven5" />
|
||||
<option name="url" value="file:/$PROJECT_DIR$/../../../../../My%20Datas/MyEasyWOL/Client/android/MyEasyWOL/app/LocalRepository" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven2" />
|
||||
<option name="name" value="maven2" />
|
||||
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
|
@ -14,8 +14,8 @@ android {
|
|||
applicationId "com.itrycn.myeasywol"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion build_versions.target_sdk
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionCode 2
|
||||
versionName "1.1"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
multiDexEnabled true
|
||||
|
@ -51,6 +51,7 @@ android {
|
|||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
if (isNeedPackage.toBoolean()) {
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
|
@ -78,6 +79,9 @@ android {
|
|||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
// Or, if you prefer, you can continue to check for errors in release builds,
|
||||
// but continue the build even when errors are found:
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
@ -125,10 +129,6 @@ dependencies {
|
|||
|
||||
implementation 'com.zzhoujay.richtext:richtext:3.0.8'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
|
||||
//ANR异常捕获
|
||||
implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0'
|
||||
|
||||
//美团多渠道打包
|
||||
implementation 'com.meituan.android.walle:library:1.1.6'
|
||||
}
|
||||
|
|
135506
Client/android/MyEasyWOL/app/mapping.txt
Normal file
135506
Client/android/MyEasyWOL/app/mapping.txt
Normal file
File diff suppressed because it is too large
Load Diff
36
Client/android/MyEasyWOL/app/proguard-rules.pro
vendored
36
Client/android/MyEasyWOL/app/proguard-rules.pro
vendored
|
@ -44,10 +44,10 @@
|
|||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class * extends android.support.v4.**
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
# -keep public class com.android.vending.licensing.ILicensingService
|
||||
|
||||
#如果有引用v4包可以添加下面这行
|
||||
-keep public class * extends android.support.v4.app.Fragment
|
||||
# -keep public class * extends android.support.v4.app.Fragment
|
||||
|
||||
##########JS接口类不混淆,否则执行不了
|
||||
-dontwarn com.android.JsInterface.**
|
||||
|
@ -134,6 +134,24 @@
|
|||
-dontwarn com.google.zxing.**
|
||||
-keep class com.google.zxing.**{*;}
|
||||
|
||||
# greendao
|
||||
-keep class org.greenrobot.greendao.**{*;}
|
||||
-keep public class * extends org.greenrobot.greendao.AbstractDao
|
||||
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
|
||||
public static java.lang.String TABLENAME;
|
||||
}
|
||||
-keep class **$Properties
|
||||
-keepclassmembers class **$Properties {*;}
|
||||
|
||||
#optional
|
||||
-keep class net.sqlcipher.**{*;}
|
||||
-keep public interface net.sqlcipher.database.**
|
||||
-dontwarn net.sqlcipher.database.**
|
||||
-dontwarn org.greenrobot.greendao.**
|
||||
-keep class okhttp3.internal.http.RealInterceptorChain.** { *; }
|
||||
-keep class com.android.** { *; }
|
||||
-keep class android.os.** { *; }
|
||||
-keep class android.app.** { *; }
|
||||
#SignalR推送
|
||||
-keep class microsoft.aspnet.signalr.** { *; }
|
||||
|
||||
|
@ -177,7 +195,7 @@
|
|||
-keep class org.xz_sale.entity.**{*;}
|
||||
-keep class com.google.gson.** {*;}
|
||||
-keep class com.google.**{*;}
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
# -keep class sun.misc.Unsafe { *; }
|
||||
-keep class com.google.gson.stream.** { *; }
|
||||
-keep class com.google.gson.examples.android.model.** { *; }
|
||||
|
||||
|
@ -200,12 +218,12 @@
|
|||
long producerIndex;
|
||||
long consumerIndex;
|
||||
}
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode producerNode;
|
||||
}
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode consumerNode;
|
||||
}
|
||||
# -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
|
||||
# rx.internal.util.atomic.LinkedQueueNode producerNode;
|
||||
# }
|
||||
# -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
|
||||
# rx.internal.util.atomic.LinkedQueueNode consumerNode;
|
||||
# }
|
||||
|
||||
-dontwarn okio.**
|
||||
-dontwarn javax.annotation.Nullable
|
||||
|
|
BIN
Client/android/MyEasyWOL/app/release/app-release.apk
Normal file
BIN
Client/android/MyEasyWOL/app/release/app-release.apk
Normal file
Binary file not shown.
18
Client/android/MyEasyWOL/app/release/output-metadata.json
Normal file
18
Client/android/MyEasyWOL/app/release/output-metadata.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"version": 2,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.itrycn.myeasywol",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 2,
|
||||
"versionName": "1.1",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
}
|
120159
Client/android/MyEasyWOL/app/seeds.txt
Normal file
120159
Client/android/MyEasyWOL/app/seeds.txt
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -23,7 +23,6 @@ import android.content.Context;
|
|||
import androidx.multidex.MultiDex;
|
||||
|
||||
import com.itrycn.myeasywol.db.DBHelper;
|
||||
import com.itrycn.myeasywol.utils.sdkinit.ANRWatchDogInit;
|
||||
import com.itrycn.myeasywol.utils.sdkinit.XBasicLibInit;
|
||||
import com.itrycn.myeasywol.utils.sdkinit.XUpdateInit;
|
||||
|
||||
|
@ -60,10 +59,6 @@ public class MyApp extends Application {
|
|||
|
||||
XUpdateInit.init(this);
|
||||
XUpdateInit.checkUpdate(this,false);
|
||||
//运营统计数据运行时不初始化
|
||||
|
||||
//ANR监控
|
||||
ANRWatchDogInit.init();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2020 xuexiangjys(xuexiangjys@163.com)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.itrycn.myeasywol.utils.sdkinit;
|
||||
|
||||
import com.github.anrwatchdog.ANRWatchDog;
|
||||
import com.xuexiang.xutil.common.logger.Logger;
|
||||
|
||||
/**
|
||||
* ANR看门狗监听器初始化
|
||||
*
|
||||
* @author xuexiang
|
||||
* @since 2020-02-18 15:08
|
||||
*/
|
||||
public final class ANRWatchDogInit {
|
||||
|
||||
private static final String TAG = "ANRWatchDog";
|
||||
|
||||
private ANRWatchDogInit() {
|
||||
throw new UnsupportedOperationException("u can't instantiate me...");
|
||||
}
|
||||
|
||||
/**
|
||||
* ANR看门狗
|
||||
*/
|
||||
private static ANRWatchDog sANRWatchDog;
|
||||
|
||||
/**
|
||||
* ANR监听触发的时间
|
||||
*/
|
||||
private static final int ANR_DURATION = 4000;
|
||||
|
||||
|
||||
/**
|
||||
* ANR静默处理【就是不处理,直接记录一下日志】
|
||||
*/
|
||||
private final static ANRWatchDog.ANRListener SILENT_LISTENER = error -> Logger.eTag(TAG, error);
|
||||
|
||||
/**
|
||||
* ANR自定义处理【可以是记录日志用于上传】
|
||||
*/
|
||||
private final static ANRWatchDog.ANRListener CUSTOM_LISTENER = error -> {
|
||||
Logger.eTag(TAG, "Detected Application Not Responding!", error);
|
||||
//这里进行ANR的捕获后的操作
|
||||
|
||||
throw error;
|
||||
};
|
||||
|
||||
public static void init() {
|
||||
//这里设置监听的间隔为2秒
|
||||
sANRWatchDog = new ANRWatchDog(2000);
|
||||
sANRWatchDog.setANRInterceptor(duration -> {
|
||||
long ret = ANR_DURATION - duration;
|
||||
if (ret > 0) {
|
||||
Logger.wTag(TAG, "Intercepted ANR that is too short (" + duration + " ms), postponing for " + ret + " ms.");
|
||||
}
|
||||
//当返回是0或者负数时,就会触发ANR监听回调
|
||||
return ret;
|
||||
}).setANRListener(SILENT_LISTENER).start();
|
||||
}
|
||||
|
||||
public static ANRWatchDog getANRWatchDog() {
|
||||
return sANRWatchDog;
|
||||
}
|
||||
}
|
19471
Client/android/MyEasyWOL/app/unused.txt
Normal file
19471
Client/android/MyEasyWOL/app/unused.txt
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -37,19 +37,6 @@ project.configurations.each { configuration ->
|
|||
//页面路由
|
||||
configuration.dependencies.add(getProject().dependencies.create('com.github.xuexiangjys.XRouter:xrouter-compiler:1.0.1'))
|
||||
}
|
||||
//设置泄露监测leak为始终release模式。
|
||||
configuration.dependencies.add(getProject().dependencies.create('com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'))
|
||||
if (configuration.name == "debugImplementation") {
|
||||
//内存泄漏监测leak
|
||||
//configuration.dependencies.add(getProject().dependencies.create('com.squareup.leakcanary:leakcanary-android:1.6.3'))
|
||||
}
|
||||
if (configuration.name == "releaseImplementation") {
|
||||
//内存泄漏监测leak
|
||||
//configuration.dependencies.add(getProject().dependencies.create('com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'))
|
||||
}
|
||||
if (configuration.name == "testImplementation") {
|
||||
//内存泄漏监测leak
|
||||
configuration.dependencies.add(getProject().dependencies.create('com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
ext {
|
||||
var = build_versions
|
||||
build_versions = build_versions
|
||||
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
apply from: './versions.gradle'
|
||||
|
|
|
@ -13,7 +13,7 @@ org.gradle.jvmargs=-Xmx1536m
|
|||
# org.gradle.parallel=true
|
||||
|
||||
# 是否打包APK,打正式包时请设置为true,使用正式的签名
|
||||
isNeedPackage=false
|
||||
isNeedPackage=true
|
||||
# 是否使用booster优化APK,这里需要注意gradle的版本,对于最新的gradle版本可能存在兼容问题
|
||||
isUseBooster=false
|
||||
android.precompileDependenciesResources=false
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#Fri Jun 28 16:23:16 CST 2019
|
||||
#Sun May 15 14:33:34 CST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
@ -106,14 +106,14 @@ ext.deps = deps
|
|||
def build_versions = [:]
|
||||
build_versions.min_sdk = 19
|
||||
build_versions.target_sdk = 28
|
||||
build_versions.build_tools = "28.0.3"
|
||||
build_versions.build_tools = "30.0.3"
|
||||
ext.build_versions = build_versions
|
||||
|
||||
def app_release = [:]
|
||||
app_release.storeFile = "../keystores/android.keystore"
|
||||
app_release.storePassword = "xuexiang"
|
||||
app_release.keyAlias = "android.keystore"
|
||||
app_release.keyPassword = "xuexiang"
|
||||
app_release.storeFile = "E:/apk.jks"
|
||||
app_release.storePassword = "XXXX"
|
||||
app_release.keyAlias = "key0"
|
||||
app_release.keyPassword = "XXXX"
|
||||
|
||||
ext.app_release = app_release
|
||||
|
||||
|
@ -152,7 +152,7 @@ static def addRepos(RepositoryHandler handler) {
|
|||
handler.jcenter { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||
handler.mavenCentral { url 'https://maven.aliyun.com/repository/central' }
|
||||
handler.maven { url "https://jitpack.io" }
|
||||
handler.maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
||||
handler.maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
||||
handler.maven { url "https://dl.bintray.com/umsdk/release" }
|
||||
handler.maven { url 'https://oss.sonatype.org/content/repositories/public' }
|
||||
//Add the Local repository
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user