更新gradle脚本
This commit is contained in:
parent
2d122a93b7
commit
2cbc018764
@ -54,6 +54,21 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
applicationVariants.all { variant ->
|
||||||
|
String variantName = variant.name.capitalize()
|
||||||
|
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
||||||
|
processManifestTask.doLast { pm->
|
||||||
|
String manifestPath = "build/intermediates/bundle_manifest/release/bundle-manifest/AndroidManifest.xml"
|
||||||
|
def isGooglePlay=rootProject.ext.manifestPlaceholders.isGooglePlay
|
||||||
|
if(file(manifestPath).exists()&&isGooglePlay) {
|
||||||
|
def manifestContent = file(manifestPath).getText()
|
||||||
|
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
||||||
|
file(manifestPath).write(manifestContent)
|
||||||
|
}else{
|
||||||
|
print "not Exists = "+manifestPath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
keyAlias 'phonelive'
|
keyAlias 'phonelive'
|
||||||
@ -141,6 +156,7 @@ dependencies {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// 链接包需要注释掉 否正无法更新 谷歌包需要打开
|
// 链接包需要注释掉 否正无法更新 谷歌包需要打开
|
||||||
|
/*
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
android.applicationVariants.all { variant ->
|
android.applicationVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
@ -152,4 +168,4 @@ project.afterEvaluate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
Loading…
Reference in New Issue
Block a user