diff --git a/ananplay.jks b/ananplay.jks deleted file mode 100644 index 8eb891c43..000000000 Binary files a/ananplay.jks and /dev/null differ diff --git a/app/build.gradle b/app/build.gradle index d77d23c70..1d5af79db 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,9 +1,8 @@ apply plugin: 'com.android.application' -//apply plugin: 'com.google.gms.google-services' -//apply plugin: 'com.google.firebase.crashlytics' apply plugin: 'kotlin-android' apply plugin: 'com.tencent.vasdolly' apply from: '../mob.gradle' +apply from: '../project.gradle' def onlyArm64 = Boolean.parseBoolean(only_arm64) @@ -11,7 +10,7 @@ android { compileSdkVersion COMPILE_SDK_VERSION.toInteger() defaultConfig { - applicationId "com.example.live" + applicationId isolationMode ? 'com.aaa.bbb' : 'com.example.live' minSdkVersion MIN_SDK_VERSION.toInteger() targetSdkVersion TARGET_SDK_VERSION.toInteger() versionCode Integer.valueOf(version_code) @@ -21,8 +20,7 @@ android { multiDexEnabled true flavorDimensions 'default' - -// manifestPlaceholders = [CRASHLYTICS_COLLECTION_ENABLED: CRASHLYTICS_COLLECTION_ENABLED.toBoolean()] + buildConfigField "boolean", "ISOLATION_MODE", "$isolationMode" } splits { @@ -78,27 +76,26 @@ android { enabled = true } -// signingConfigs { -// -// v2 { -// storeFile file('../ananplay.jks') -// storePassword "vele2021" -// keyAlias "ananplay" -// keyPassword "vele2021" -// v2SigningEnabled true -// v1SigningEnabled true -// } -// -// v1 { -// storeFile file('../ananplay.jks') -// storePassword "vele2021" -// keyAlias "ananplay" -// keyPassword "vele2021" -// v2SigningEnabled false -// v1SigningEnabled true -// } -// -// } + signingConfigs { + + debug { + storeFile file('../app_debug.jks') + storePassword "debug2023" + keyAlias "debug" + keyPassword "debug2023" + v2SigningEnabled true + v1SigningEnabled true + } + + release { + storeFile file('../app_debug.jks') + storePassword "debug2023" + keyAlias "debug" + keyPassword "debug2023" + v2SigningEnabled true + v1SigningEnabled true + } + } sourceSets { @@ -163,7 +160,7 @@ android { minifyEnabled minify_enabled.toBoolean() // 是否混淆 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' crunchPngs false // 停用 PNG 压缩 -// signingConfig signingConfigs.v2 + signingConfig isolationMode ? signingConfigs.debug : signingConfigs.release gradle.taskGraph.whenReady { tasks.each { task -> if (task.name.contains("Test") || task.name.contains("Lint")) { @@ -189,7 +186,7 @@ android { shrinkResources true // 开了混淆的时候才能开启 是否去除无效的资源文件 zipAlignEnabled true // 开了混淆的时候才能开启 是否进行压缩并重排列 crunchPngs true // 启用 PNG 压缩 -// signingConfig signingConfigs.v2 + signingConfig isolationMode ? signingConfigs.debug : signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -304,7 +301,10 @@ dependencies { implementation 'tech.sud.mgp:SudMGP-static:1.3.3.1158' - implementation project(':modules:module_google') + implementation project(':modules:module_base') + if (!isolationMode) { + implementation project(':modules:module_google') + } } channel { diff --git a/app_debug.jks b/app_debug.jks new file mode 100644 index 000000000..2d520d47b Binary files /dev/null and b/app_debug.jks differ diff --git a/gradle.properties b/gradle.properties index 4846dabc8..78590494a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,6 +23,9 @@ MobSDK.spEdition=FP only_arm64=false minify_enabled=false +# 是否隔离模式:换包名、换签名、隐藏部分SDK-KEY信息、去掉部分SDK(Google相关) +isolation_mode=true + channel_file=channel.txt CRASHLYTICS_COLLECTION_ENABLED=false diff --git a/pekolive.jks b/pekolive.jks deleted file mode 100644 index b504f9770..000000000 Binary files a/pekolive.jks and /dev/null differ diff --git a/project.gradle b/project.gradle new file mode 100644 index 000000000..33e5a523b --- /dev/null +++ b/project.gradle @@ -0,0 +1,13 @@ +ext { + isolationMode = isReleaseBuildType() ? false : Boolean.valueOf(isolation_mode) + println("是否隔离模式:" + isolationMode) +} + +boolean isReleaseBuildType() { + for (String s : gradle.startParameter.taskNames) { + if (s.contains("Release") | s.contains("release")) { + return true + } + } + return false +}