You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.9 KiB

plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
// id 'com.huawei.agconnect'
}
4 years ago
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def mfph = [
//宿主包名
"apk.applicationId" : "com.zsw.huixiang",
XG_ACCESS_ID : "1580005689", // 信鸽官网注册所得ACCESS_ID
XG_ACCESS_KEY : "A1HKKUUWI7WI",
4 years ago
]
android {
namespace "com.zsw.huixiang"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
4 years ago
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
4 years ago
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
3 years ago
}
4 years ago
defaultConfig {
applicationId "com.zsw.huixiang"
4 years ago
minSdkVersion 21
targetSdkVersion 34
4 years ago
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
manifestPlaceholders = mfph
}
signingConfigs {
config {
keyAlias 'huixiang'
keyPassword 'huixiang'
storeFile file('huixiang.jks')
storePassword 'huixiang'
v1SigningEnabled true //兼容v1
v2SigningEnabled true //兼容v2
}
debug {//debug版签名配置
keyAlias 'huixiang'
keyPassword 'huixiang'
storeFile file('huixiang.jks')
storePassword 'huixiang'
v1SigningEnabled true //兼容v1
v2SigningEnabled true //兼容v2
}
4 years ago
}
buildTypes {
release {
3 years ago
// debuggable true
3 years ago
shrinkResources false
minifyEnabled false
4 years ago
signingConfig signingConfigs.config
3 years ago
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk {
/// 选择要添加的对应.so 库。
3 years ago
abiFilters 'armeabi-v7a','arm64-v8a','x86'
}
4 years ago
}
debug {
3 years ago
// debuggable true
3 years ago
shrinkResources false
minifyEnabled false
signingConfig signingConfigs.config
3 years ago
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk {
/// 选择要添加的对应.so 库。
abiFilters 'armeabi-v7a', 'arm64-v8a','x86','x86_64'
}
}
4 years ago
}
}
flutter {
source '../..'
}
dependencies {}