1.2.8 增加上传平台
This commit is contained in:
220
app/build.gradle
220
app/build.gradle
@@ -1,26 +1,9 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
static String getBuildConfigFieldValue(def variant, def fiedName) {
|
||||
def properties = variant.productFlavors[0].properties
|
||||
def name = properties.get("name")
|
||||
if (name != variant.flavorName) {
|
||||
return ""
|
||||
}
|
||||
def configs = properties.get("buildConfigFields")
|
||||
def address = null
|
||||
for (Map.Entry<String, Object> item : configs) {
|
||||
def key = item.key
|
||||
if (key == fiedName) {
|
||||
address = item.value
|
||||
}
|
||||
}
|
||||
if (address == null) return ""
|
||||
def field = address.getClass().getDeclaredField("value")
|
||||
field.setAccessible(true)
|
||||
return field.get(address).toString().replace("\"", "")
|
||||
static def appName() {
|
||||
return "小酷守护"
|
||||
}
|
||||
|
||||
|
||||
static def releaseTime() {
|
||||
return new Date().format("yyyyMMdd_HHmmss", TimeZone.getDefault())
|
||||
}
|
||||
@@ -30,9 +13,12 @@ android {
|
||||
buildToolsVersion "29.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.uiuipad.find"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
|
||||
versionCode 29
|
||||
versionName "1.2.8"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -43,6 +29,12 @@ android {
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', "x86"
|
||||
// 还可以添加 'armeabi', 'x86', 'x86_64', 'mips', 'mips64'
|
||||
}
|
||||
|
||||
buildConfigField "String", "app_name", '"小酷守护"'
|
||||
manifestPlaceholders = [
|
||||
ALIPUSH_KEY : "333898263",
|
||||
ALIPUSH_SECRET: "e1b374229ffe479eb34ba74432b7e454",
|
||||
]
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@@ -61,57 +53,6 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
//多版本
|
||||
productFlavors {
|
||||
kuxin {
|
||||
flavorDimensions "default"
|
||||
applicationId "com.uiuipad.find"
|
||||
versionCode 27
|
||||
versionName "1.2.6"
|
||||
buildConfigField "String", "app_name", '"小酷守护"'
|
||||
manifestPlaceholders = [
|
||||
ALIPUSH_KEY : "333898263",
|
||||
ALIPUSH_SECRET: "e1b374229ffe479eb34ba74432b7e454",
|
||||
]
|
||||
}
|
||||
|
||||
aiKuxin {
|
||||
flavorDimensions "default"
|
||||
applicationId "com.aole.safe"
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
buildConfigField "String", "app_name", '"守护中心"'
|
||||
manifestPlaceholders = [
|
||||
ALIPUSH_KEY : "333982424",
|
||||
ALIPUSH_SECRET: "c831992e2de743dcad66f5ec420798a4",
|
||||
]
|
||||
}
|
||||
|
||||
aigo {
|
||||
flavorDimensions "default"
|
||||
applicationId "com.safeos.ae"
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
buildConfigField "String", "app_name", '"安全守护"'
|
||||
manifestPlaceholders = [
|
||||
ALIPUSH_KEY : "333982410",
|
||||
ALIPUSH_SECRET: "6d8785a73d904055ac00f84d83400be4",
|
||||
]
|
||||
}
|
||||
|
||||
phone {
|
||||
flavorDimensions "default"
|
||||
applicationId "com.dangsafe.kf"
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
buildConfigField "String", "app_name", '"时间守护"'
|
||||
manifestPlaceholders = [
|
||||
ALIPUSH_KEY : "333982833",
|
||||
ALIPUSH_SECRET: "67a5bf10515947459c04fc000367feca",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
//签名
|
||||
signingConfigs {
|
||||
//iPlay50 mini,iPlay50 android13 共用签名
|
||||
@@ -165,65 +106,65 @@ android {
|
||||
v2SigningEnabled false
|
||||
}
|
||||
|
||||
UnisocS6688 {
|
||||
storeFile file("keystore/UnisocS6688Userdebug.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "unisocs6688userdebug"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
Aigo1071 {
|
||||
storeFile file("keystore/Aigo1071.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "aigo1071"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
// UnisocS6688 {
|
||||
// storeFile file("keystore/UnisocS6688Userdebug.jks")
|
||||
// storePassword "123456"
|
||||
// keyAlias "unisocs6688userdebug"
|
||||
// keyPassword "123456"
|
||||
// v1SigningEnabled true
|
||||
// v2SigningEnabled true
|
||||
// }
|
||||
//
|
||||
// Aigo1071 {
|
||||
// storeFile file("keystore/Aigo1071.jks")
|
||||
// storePassword "123456"
|
||||
// keyAlias "aigo1071"
|
||||
// keyPassword "123456"
|
||||
// v1SigningEnabled true
|
||||
// v2SigningEnabled true
|
||||
// }
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
Aigo1071Debug.initWith(debug)
|
||||
Aigo1071Debug {
|
||||
versionNameSuffix "-debug"
|
||||
debuggable true
|
||||
signingConfig signingConfigs.Aigo1071
|
||||
buildConfigField "String", "platform", '"W8183"'
|
||||
manifestPlaceholders = [
|
||||
Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
]
|
||||
}
|
||||
|
||||
Aigo1071Release.initWith(release)
|
||||
Aigo1071Release {
|
||||
signingConfig signingConfigs.Aigo1071
|
||||
buildConfigField "String", "platform", '"W8183"'
|
||||
manifestPlaceholders = [
|
||||
Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
]
|
||||
}
|
||||
|
||||
UnisocS6688Debug.initWith(debug)
|
||||
UnisocS6688Debug {
|
||||
versionNameSuffix "-debug"
|
||||
debuggable true
|
||||
signingConfig signingConfigs.UnisocS6688
|
||||
buildConfigField "String", "platform", '"S6688"'
|
||||
manifestPlaceholders = [
|
||||
Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
]
|
||||
}
|
||||
|
||||
UnisocS6688Release.initWith(release)
|
||||
UnisocS6688Release {
|
||||
signingConfig signingConfigs.UnisocS6688
|
||||
buildConfigField "String", "platform", '"S6688"'
|
||||
manifestPlaceholders = [
|
||||
Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
]
|
||||
}
|
||||
// Aigo1071Debug.initWith(debug)
|
||||
// Aigo1071Debug {
|
||||
// versionNameSuffix "-debug"
|
||||
// debuggable true
|
||||
// signingConfig signingConfigs.Aigo1071
|
||||
// buildConfigField "String", "platform", '"W8183"'
|
||||
// manifestPlaceholders = [
|
||||
// Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// Aigo1071Release.initWith(release)
|
||||
// Aigo1071Release {
|
||||
// signingConfig signingConfigs.Aigo1071
|
||||
// buildConfigField "String", "platform", '"W8183"'
|
||||
// manifestPlaceholders = [
|
||||
// Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// UnisocS6688Debug.initWith(debug)
|
||||
// UnisocS6688Debug {
|
||||
// versionNameSuffix "-debug"
|
||||
// debuggable true
|
||||
// signingConfig signingConfigs.UnisocS6688
|
||||
// buildConfigField "String", "platform", '"S6688"'
|
||||
// manifestPlaceholders = [
|
||||
// Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// UnisocS6688Release.initWith(release)
|
||||
// UnisocS6688Release {
|
||||
// signingConfig signingConfigs.UnisocS6688
|
||||
// buildConfigField "String", "platform", '"S6688"'
|
||||
// manifestPlaceholders = [
|
||||
// Baidu_AK: "YCmfZSw54O992lChzS3c4roYioitT54h"
|
||||
// ]
|
||||
// }
|
||||
|
||||
teclast8183Debug.initWith(debug)
|
||||
teclast8183Debug {
|
||||
@@ -330,7 +271,7 @@ android {
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
if (outputFile != null) {
|
||||
def fileName = "${getBuildConfigFieldValue(variant, "app_name")}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
output.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
@@ -355,7 +296,7 @@ android {
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = ""
|
||||
if (outputFile != null) {
|
||||
def fileName = "${getBuildConfigFieldValue(variant, "app_name")}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
output.outputFileName = new File(outputFile, fileName)
|
||||
}
|
||||
}
|
||||
@@ -363,29 +304,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
kuxin {
|
||||
res {
|
||||
srcDirs 'src/res'
|
||||
}
|
||||
}
|
||||
aiKuxin {
|
||||
res {
|
||||
srcDirs 'src/aiKuxin/res'
|
||||
}
|
||||
}
|
||||
aigo {
|
||||
res {
|
||||
srcDirs 'src/aigo/res'
|
||||
}
|
||||
}
|
||||
phone {
|
||||
res {
|
||||
srcDirs 'src/phone/res'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path file('CMakeLists.txt')
|
||||
|
||||
Reference in New Issue
Block a user