|
|
|
plugins {
|
|
|
|
id "com.android.application"
|
|
|
|
id "kotlin-android"
|
|
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
|
|
// id 'com.huawei.agconnect'
|
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
|
|
|
]
|
|
|
|
|
|
|
|
android {
|
|
|
|
namespace "com.zsw.huixiang"
|
|
|
|
compileSdk flutter.compileSdkVersion
|
|
|
|
ndkVersion flutter.ndkVersion
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = '1.8'
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.zsw.huixiang"
|
|
|
|
|
|
|
|
minSdkVersion 21
|
|
|
|
targetSdkVersion 34
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
// debuggable true
|
|
|
|
shrinkResources false
|
|
|
|
minifyEnabled false
|
|
|
|
signingConfig signingConfigs.config
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
|
|
|
|
ndk {
|
|
|
|
/// 选择要添加的对应.so 库。
|
|
|
|
abiFilters 'armeabi-v7a','arm64-v8a','x86'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
debug {
|
|
|
|
// debuggable true
|
|
|
|
shrinkResources false
|
|
|
|
minifyEnabled false
|
|
|
|
signingConfig signingConfigs.config
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
|
|
|
|
ndk {
|
|
|
|
/// 选择要添加的对应.so 库。
|
|
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a','x86','x86_64'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
flutter {
|
|
|
|
source '../..'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {}
|