Commit 885de2dc by pye52

增加daemon打包时自动签名的配置及证书,避免因为daemon没有签名而安装失败

parent 0b51e3c7
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
......
package com.bgycc.smartcanteen.util;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
......@@ -8,8 +9,8 @@ import android.support.annotation.RequiresPermission;
import android.telephony.SmsManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ShellUtils;
import com.blankj.utilcode.util.Utils;
......@@ -117,7 +118,7 @@ public class DangerousUtils {
&& commandResult.successMsg.toLowerCase().contains("success")) {
return true;
} else {
Log.e("AppUtils", "installAppSilent successMsg: " + commandResult.successMsg +
LogUtils.e("AppUtils", "installAppSilent successMsg: " + commandResult.successMsg +
", errorMsg: " + commandResult.errorMsg);
return false;
}
......@@ -173,7 +174,7 @@ public class DangerousUtils {
&& commandResult.successMsg.toLowerCase().contains("success")) {
return true;
} else {
Log.e("AppUtils", "uninstallAppSilent successMsg: " + commandResult.successMsg +
LogUtils.e("AppUtils", "uninstallAppSilent successMsg: " + commandResult.successMsg +
", errorMsg: " + commandResult.errorMsg);
return false;
}
......@@ -325,7 +326,7 @@ public class DangerousUtils {
setDataEnabledMethod.invoke(tm, enabled);
return true;
} catch (Exception e) {
Log.e("NetworkUtils", "setMobileDataEnabled: ", e);
LogUtils.e("NetworkUtils", "setMobileDataEnabled: ", e);
}
return false;
}
......
......@@ -12,6 +12,22 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
canteen {
keyAlias 'town'
keyPassword 'maxrocky'
storeFile file('./canteen.jks')
storePassword 'maxrocky'
}
buildTypes {
debug {
signingConfig signingConfigs.canteen
}
release {
signingConfig signingConfigs.canteen
}
}
}
buildTypes {
debug {
minifyEnabled false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment