谷歌敏感权限

This commit is contained in:
18142669586 2022-09-19 13:51:59 +08:00
parent fc0c734261
commit 8c75b80535
5 changed files with 26 additions and 6 deletions

View File

@ -1,12 +1,12 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'img-optimizer' apply plugin: 'img-optimizer'
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
//
android { android {
dexOptions { dexOptions {
jumboMode = true jumboMode = true
} }
compileSdkVersion rootProject.ext.android.compileSdkVersion compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion buildToolsVersion rootProject.ext.android.buildToolsVersion
packagingOptions { packagingOptions {
@ -113,3 +113,16 @@ dependencies {
} }
//
project.afterEvaluate {
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
output.processResources.doFirst { pm->
String manifestPath = output.processResources.manifestFile;
def manifestContent = file(manifestPath).getText()
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
file(manifestPath).write(manifestContent)
}
}
}
}

View File

@ -47,6 +47,10 @@
<uses-permission <uses-permission
android:name="android.permission.MODIFY_AUDIO_SETTINGS" android:name="android.permission.MODIFY_AUDIO_SETTINGS"
tools:node="remove" /> tools:node="remove" />
<uses-permission
android:name="android.permission.REQUEST_INSTALL_PACKAGES"
tools:node="remove" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

View File

@ -26,6 +26,7 @@ buildscript {
} }
allprojects { allprojects {
repositories { repositories {
maven { url "https://maven.rongcloud.cn/repository/maven-releases/" } maven { url "https://maven.rongcloud.cn/repository/maven-releases/" }
@ -42,4 +43,5 @@ allprojects {
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

View File

@ -63,6 +63,7 @@ repositories {
} }
} }
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
api rootProject.ext.dependencies["appcompat-androidx"] api rootProject.ext.dependencies["appcompat-androidx"]

View File

@ -5,14 +5,14 @@ ext {
minSdkVersion : 21, minSdkVersion : 21,
targetSdkVersion : 30, targetSdkVersion : 30,
versionCode : 212, versionCode : 212,
versionName : "6.4.1" versionName : "6.4.0"
] ]
manifestPlaceholders = [ manifestPlaceholders = [
// //
// serverHost : "https://napi.yaoulive.com", serverHost : "https://napi.yaoulive.com",
// //
serverHost : "https://ceshi.yaoulive.com", // serverHost : "https://ceshi.yaoulive.com",
// //
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
@ -25,6 +25,6 @@ ext {
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
// true表示谷歌支付 false // true表示谷歌支付 false
isGooglePlay : true isGooglePlay : false
] ]
} }