Commit 3d487408 by sikang

update script

parent 8961b049
...@@ -25,11 +25,44 @@ android { ...@@ -25,11 +25,44 @@ android {
lintOptions { lintOptions {
disable 'GoogleAppIndexingWarning' disable 'GoogleAppIndexingWarning'
} }
productFlavors {
website {
//是否集成bugly
buildConfigField 'Boolean', 'LOAD_BUGLY', 'true'
dimension "channel"
}
googleplay {
buildConfigField 'Boolean', 'LOAD_BUGLY', 'false'
dimension "channel"
}
}
} }
dependencies { dependencies {
// getGradle().getStartParameter().getTaskRequests()[0] exec{
workingDir = "../lib_base/script"
if ("${tongdun_parent_key}".size() > 5) {
implementation(name: 'android_spirit-20190220-2.0.0.1', ext: 'aar')
implementation 'com.alibaba:fastjson:1.1.58.android'
executable 'sh' args "-c","./sdk_manager.py open TD"
}else{
executable 'sh' args "-c","./sdk_manager.py close TD"
}
}
// exec{
// workingDir = "../lib_base/script"
// def startParams = getGradle().getStartParameter().getTaskRequests()[0]
// if(startParams!=null && startParams.getArgs().toString().contains("Website")){
// implementation 'com.tencent.bugly:crashreport:3.0.0'
// executable 'sh' args "-c","./sdk_manager.py open BUGLY"
// }else{
// executable 'sh' args "-c","./sdk_manager.py close BUGLY"
// }
// }
implementation project(':cash_plugin_toolbox') implementation project(':cash_plugin_toolbox')
} }
...@@ -41,3 +74,4 @@ walle { ...@@ -41,3 +74,4 @@ walle {
// 渠道配置文件 // 渠道配置文件
channelFile = new File("${project.getProjectDir()}/channel") channelFile = new File("${project.getProjectDir()}/channel")
} }
...@@ -73,13 +73,11 @@ dependencies { ...@@ -73,13 +73,11 @@ dependencies {
// api 'me.jessyan:autosize:1.0.6' // api 'me.jessyan:autosize:1.0.6'
//同盾 //同盾
// compileOnly(name: 'android_spirit-20190220-2.0.0.1', ext: 'aar') compileOnly(name: 'android_spirit-20190220-2.0.0.1', ext: 'aar')
api(name: 'libfbref-release', ext: 'aar') api(name: 'libfbref-release', ext: 'aar')
api 'com.alibaba:fastjson:1.1.58.android'
//QMUI //QMUI
api 'com.qmuiteam:qmui:1.1.10' api 'com.qmuiteam:qmui:1.1.10'
......
...@@ -8,7 +8,6 @@ import sys ...@@ -8,7 +8,6 @@ import sys
def close_sdk(path, sdk): def close_sdk(path, sdk):
# print("processing content: %s..." % path) # print("processing content: %s..." % path)
with open(path, "r", encoding="utf-8") as f: with open(path, "r", encoding="utf-8") as f:
# readlines以列表的形式将文件读出
lines = f.readlines() lines = f.readlines()
with open(path, "w", encoding="utf-8") as f_w: with open(path, "w", encoding="utf-8") as f_w:
...@@ -31,7 +30,6 @@ def open_sdk(path, sdk): ...@@ -31,7 +30,6 @@ def open_sdk(path, sdk):
# print("processing content: %s..." % path) # print("processing content: %s..." % path)
code_mark = "//SDK-" + sdk + "-CODE ->" code_mark = "//SDK-" + sdk + "-CODE ->"
with open(path, "r", encoding="utf-8") as f: with open(path, "r", encoding="utf-8") as f:
# readlines以列表的形式将文件读出
lines = f.readlines() lines = f.readlines()
with open(path, "w", encoding="utf-8") as f_w: with open(path, "w", encoding="utf-8") as f_w:
......
...@@ -52,6 +52,7 @@ public abstract class BaseApplication extends MultiDexApplication { ...@@ -52,6 +52,7 @@ public abstract class BaseApplication extends MultiDexApplication {
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
// CrashReport.initCrashReport(getApplicationContext(), "注册时申请的APPID", false);
AppLanguageUtils.setLanguage(this, LibConfig.LANGUAGE); AppLanguageUtils.setLanguage(this, LibConfig.LANGUAGE);
......
...@@ -70,6 +70,7 @@ public class LibConfig { ...@@ -70,6 +70,7 @@ public class LibConfig {
public static String APPSFLYER_DEV_KEY; public static String APPSFLYER_DEV_KEY;
public static String XH_CHANNEL_NAME; public static String XH_CHANNEL_NAME;
public static boolean IS_COLLECT_MODE; public static boolean IS_COLLECT_MODE;
public static boolean LOAD_BUGLY = false;
public static String TEST_TOKEN; public static String TEST_TOKEN;
public static String LANGUAGE = "in"; public static String LANGUAGE = "in";
public static int HARVESTER_PORT;// public static int HARVESTER_PORT;//
...@@ -141,7 +142,6 @@ public class LibConfig { ...@@ -141,7 +142,6 @@ public class LibConfig {
} }
/** /**
* init FirebaseRemoteConfig 1 * init FirebaseRemoteConfig 1
*/ */
......
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 to comment