144 lines
4.7 KiB
Groovy
144 lines
4.7 KiB
Groovy
buildscript {
|
||
repositories {
|
||
jcenter()
|
||
google()
|
||
}
|
||
dependencies {
|
||
classpath 'com.android.tools.build:gradle:8.13.0'
|
||
}
|
||
}
|
||
apply plugin: 'com.android.application'
|
||
|
||
dependencies {
|
||
implementation fileTree(include: '*.jar', dir: 'libs')
|
||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||
implementation "androidx.annotation:annotation:1.1.0"
|
||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||
}
|
||
|
||
android {
|
||
namespace 'com.tiqiaa.remotedemo'
|
||
|
||
if (new File("H:\\develop\\ide\\keystore.properties").exists()) {
|
||
Properties props = new Properties()
|
||
println 'A message which is logged at INFO level'
|
||
props.load(new FileInputStream(file("H:\\develop\\ide\\keystore.properties")))
|
||
println props['storeFile']
|
||
println props['storePassword']
|
||
println props['keyPassword']
|
||
signingConfigs {
|
||
icontrol {
|
||
storeFile file(props['storeFile'])
|
||
storePassword props['storePassword']
|
||
keyAlias '遥控精灵'
|
||
keyPassword props['keyPassword']
|
||
}
|
||
}
|
||
buildTypes {
|
||
flavorDimensions "debug", "release"
|
||
debug {
|
||
signingConfig signingConfigs.icontrol
|
||
}
|
||
release {
|
||
minifyEnabled true
|
||
shrinkResources true
|
||
signingConfig signingConfigs.icontrol
|
||
proguardFile 'proguard.cfg'
|
||
}
|
||
}
|
||
productFlavors {
|
||
demo {
|
||
ndk {
|
||
abiFilters "armeabi-v7a", "arm64-v8a" // 只保留这几种CPU架构的SO库,需要高版本的gradle才支持
|
||
}
|
||
dimension "debug"
|
||
signingConfig signingConfigs.icontrol
|
||
resValue "string", "app_name_tiqiaa", "遥控精灵"
|
||
resValue "id", "webviewload_monitor_cancel_point", ""
|
||
}
|
||
prod {
|
||
ndk {
|
||
abiFilters "armeabi-v7a", "arm64-v8a" // 只保留这几种CPU架构的SO库,需要高版本的gradle才支持
|
||
}
|
||
dimension "release"
|
||
|
||
signingConfig signingConfigs.icontrol
|
||
proguardFile 'proguard.cfg'
|
||
resValue "string", "app_name_tiqiaa", "遥控精灵"
|
||
}
|
||
}
|
||
} else {
|
||
buildTypes {
|
||
flavorDimensions "debug", "release"
|
||
|
||
}
|
||
productFlavors {
|
||
demo {
|
||
ndk {
|
||
abiFilters "armeabi-v7a", "arm64-v8a" // 只保留这几种CPU架构的SO库,需要高版本的gradle才支持
|
||
}
|
||
dimension "debug"
|
||
resValue "string", "app_name_tiqiaa", "遥控精灵"
|
||
resValue "id", "webviewload_monitor_cancel_point", ""
|
||
}
|
||
prod {
|
||
ndk {
|
||
abiFilters "armeabi-v7a", "arm64-v8a"// 只保留这几种CPU架构的SO库,需要高版本的gradle才支持
|
||
}
|
||
dimension "release"
|
||
proguardFile 'proguard.cfg'
|
||
resValue "string", "app_name_tiqiaa", "遥控精灵"
|
||
}
|
||
}
|
||
}
|
||
compileSdkVersion 35
|
||
buildToolsVersion '35.0.0'
|
||
useLibrary 'org.apache.http.legacy'
|
||
sourceSets {
|
||
main {
|
||
manifest.srcFile 'AndroidManifest.xml'
|
||
java.srcDirs = ['src']
|
||
resources.srcDirs = ['src']
|
||
aidl.srcDirs = ['src']
|
||
renderscript.srcDirs = ['src']
|
||
res.srcDirs = ['res']
|
||
assets.srcDirs = ['assets']
|
||
jniLibs.srcDirs = ['libs']
|
||
}
|
||
|
||
// Move the tests to tests/java, tests/res, etc...
|
||
// instrumentTest.setRoot('tests')
|
||
|
||
// Move the build types to build-types/<type>
|
||
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
|
||
// This moves them out of them default location under src/<type>/... which would
|
||
// conflict with src/ being used by the main source set.
|
||
// Adding new build types or product flavors should be accompanied
|
||
// by a similar customization.
|
||
debug.setRoot('build-types/debug')
|
||
release.setRoot('build-types/release')
|
||
}
|
||
defaultConfig {
|
||
minSdkVersion 21
|
||
targetSdkVersion 35
|
||
}
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_1_8
|
||
targetCompatibility JavaVersion.VERSION_1_8
|
||
}
|
||
dependenciesInfo {
|
||
includeInApk false
|
||
includeInBundle false
|
||
}
|
||
ndkVersion '27.2.12479018'
|
||
buildFeatures {
|
||
renderScript true
|
||
aidl true
|
||
}
|
||
}
|
||
|
||
repositories {
|
||
google()
|
||
}
|