version:1.3.5
fix:增加展锐平台签名 add:
This commit is contained in:
@@ -10,13 +10,13 @@ def releaseTime() {
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion "29.0.2"
|
||||
buildToolsVersion "29.0.3"
|
||||
defaultConfig {
|
||||
applicationId "com.info.sn"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 28
|
||||
versionCode 31
|
||||
versionName "1.3.1"
|
||||
versionCode 35
|
||||
versionName "1.3.5"
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
ndk {
|
||||
@@ -31,6 +31,12 @@ android {
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
@@ -42,6 +48,14 @@ android {
|
||||
}
|
||||
//签名
|
||||
signingConfigs {
|
||||
zhanRui {
|
||||
storeFile file("src/keys/zhanxun.keystore")
|
||||
storePassword "123456"
|
||||
keyAlias "zhanxun"
|
||||
keyPassword "123456"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
debug {
|
||||
storeFile file("src/keys/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
@@ -59,9 +73,22 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
zhanRuiRelease.initWith(release)
|
||||
zhanRuiRelease {
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
signingConfig signingConfigs.zhanRui
|
||||
}
|
||||
|
||||
zhanRuiDebug.initWith(debug)
|
||||
zhanRuiDebug {
|
||||
versionNameSuffix "-debug"
|
||||
buildConfigField "String", "platform", '"ZhanRui"'
|
||||
debuggable true
|
||||
signingConfig signingConfigs.zhanRui
|
||||
}
|
||||
|
||||
debug {
|
||||
// 显示Log
|
||||
buildConfigField "boolean", "LOG_DEBUG", "true"
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
versionNameSuffix "-debug"
|
||||
minifyEnabled false
|
||||
//Zipalign优化
|
||||
@@ -70,15 +97,15 @@ android {
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
if (outputFile != null) {
|
||||
def fileName = "${appName()}-V${defaultConfig.versionName}-${releaseTime()}.apk"
|
||||
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
output.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
release {
|
||||
// 不显示Log
|
||||
buildConfigField "boolean", "LOG_DEBUG", "false"
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
//混淆
|
||||
minifyEnabled false
|
||||
//Zipalign优化
|
||||
@@ -92,9 +119,8 @@ android {
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = ""
|
||||
if (outputFile != null) {
|
||||
def fileName = "${appName()}-${defaultConfig.versionCode}-V${defaultConfig.versionName}-${releaseTime()}.apk"
|
||||
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
output.outputFileName = new File(outputFile, fileName)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,25 +153,19 @@ dependencies {
|
||||
implementation 'com.hjq:xxpermissions:6.0'
|
||||
//okhttp
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.6.0'
|
||||
//RxJava和Retrofit
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.2.5'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
|
||||
//http框架
|
||||
//implementation 'com.lzy.net:okgo:3.0.4'
|
||||
//implementation 'com.lzy.net:okrx:0.1.2'
|
||||
//implementation 'com.lzy.net:okserver:2.0.5'
|
||||
|
||||
//Retrofit
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
|
||||
//RxJava
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.google.zxing:core:3.3.0'
|
||||
|
||||
implementation 'com.alibaba:fastjson:1.2.70'
|
||||
|
||||
|
||||
//implementation 'com.blankj:utilcode:1.26.0'
|
||||
implementation 'com.arialyy.aria:core:3.8.15'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.8.15'
|
||||
@@ -158,3 +178,24 @@ dependencies {
|
||||
//https://github.com/JessYanCoding/AndroidAutoSize
|
||||
implementation 'me.jessyan:autosize:1.2.1'
|
||||
}
|
||||
|
||||
preBuild {
|
||||
doLast {
|
||||
def imlFile = file(project.name + ".iml")
|
||||
println 'Change ' + project.name + '.iml order'
|
||||
try {
|
||||
def parsedXml = (new XmlParser()).parse(imlFile)
|
||||
def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
|
||||
parsedXml.component[1].remove(jdkNode)
|
||||
def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform"
|
||||
println 'what' + sdkString
|
||||
new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
|
||||
groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
|
||||
} catch (FileNotFoundException e) {
|
||||
// nop, iml not found
|
||||
println "no iml found"
|
||||
}
|
||||
}
|
||||
//https://www.pianshen.com/article/93481144911/
|
||||
//使用系统编译后的framework.jar
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user