108 lines
2.8 KiB
Groovy
108 lines
2.8 KiB
Groovy
|
|
buildscript {
|
||
|
|
repositories {
|
||
|
|
google()
|
||
|
|
mavenCentral()
|
||
|
|
}
|
||
|
|
dependencies {
|
||
|
|
classpath 'com.android.tools.build:gradle:7.0.4'
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
allprojects {
|
||
|
|
repositories {
|
||
|
|
google()
|
||
|
|
mavenCentral()
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
apply plugin: 'com.android.application'
|
||
|
|
|
||
|
|
android {
|
||
|
|
compileSdkVersion 34
|
||
|
|
|
||
|
|
useLibrary 'org.apache.http.legacy'
|
||
|
|
|
||
|
|
defaultConfig {
|
||
|
|
applicationId "com.jxkh.queyi"
|
||
|
|
minSdkVersion 21
|
||
|
|
targetSdkVersion 34
|
||
|
|
versionCode 16
|
||
|
|
versionName "1.0.16"
|
||
|
|
|
||
|
|
ndk {
|
||
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
sourceSets {
|
||
|
|
main {
|
||
|
|
manifest.srcFile 'AndroidManifest.xml'
|
||
|
|
java.srcDirs = ['src']
|
||
|
|
res.srcDirs = ['res']
|
||
|
|
assets.srcDirs = ['assets']
|
||
|
|
jniLibs.srcDirs = ['libs']
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
lintOptions {
|
||
|
|
abortOnError false
|
||
|
|
}
|
||
|
|
|
||
|
|
signingConfigs {
|
||
|
|
debug {
|
||
|
|
storeFile file('android.keystore')
|
||
|
|
storePassword 'sqys2016'
|
||
|
|
keyAlias 'android.keystore'
|
||
|
|
keyPassword 'sqys2016'
|
||
|
|
v1SigningEnabled true
|
||
|
|
v2SigningEnabled true
|
||
|
|
}
|
||
|
|
release {
|
||
|
|
storeFile file('android.keystore')
|
||
|
|
storePassword 'sqys2016'
|
||
|
|
keyAlias 'android.keystore'
|
||
|
|
keyPassword 'sqys2016'
|
||
|
|
v1SigningEnabled true
|
||
|
|
v2SigningEnabled true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
buildTypes {
|
||
|
|
debug {
|
||
|
|
signingConfig signingConfigs.debug
|
||
|
|
}
|
||
|
|
release {
|
||
|
|
signingConfig signingConfigs.release
|
||
|
|
minifyEnabled false
|
||
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
dependencies {
|
||
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'], exclude: ['TencentLocationSdk*.jar'])
|
||
|
|
implementation project(':libcocos2dx')
|
||
|
|
implementation 'junit:junit:4.13.2'
|
||
|
|
implementation 'com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.6.1.12'
|
||
|
|
}
|
||
|
|
|
||
|
|
// Remove android:testOnly="true" from APK manifests
|
||
|
|
// Android Studio Run button injects this flag, causing Huawei devices
|
||
|
|
// to show "此应用与最新版android不兼容" warning during installation
|
||
|
|
afterEvaluate {
|
||
|
|
android.applicationVariants.all { variant ->
|
||
|
|
variant.outputs.each { output ->
|
||
|
|
output.processManifest.doLast {
|
||
|
|
fileTree("${buildDir}/intermediates").matching {
|
||
|
|
include '**/AndroidManifest.xml'
|
||
|
|
}.each { File f ->
|
||
|
|
def text = f.getText('UTF-8')
|
||
|
|
if (text.contains('android:testOnly="true"')) {
|
||
|
|
f.text = text.replace(' android:testOnly="true"', '')
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|