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.
159 lines
4.2 KiB
159 lines
4.2 KiB
plugins { |
|
id "com.android.application" |
|
id "kotlin-android" |
|
id "dev.flutter.flutter-gradle-plugin" |
|
id "com.mob.sdk" |
|
// 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", |
|
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 { |
|
shrinkResources false |
|
minifyEnabled true |
|
signingConfig signingConfigs.config |
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
|
} |
|
debug { |
|
shrinkResources false |
|
minifyEnabled true |
|
signingConfig signingConfigs.config |
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
|
} |
|
} |
|
} |
|
|
|
flutter { |
|
source '../..' |
|
} |
|
|
|
dependencies { |
|
implementation("com.tencent.tpns:xiaomi:1.4.3.6-release") |
|
|
|
implementation("com.tencent.tpns:huawei:1.4.3.6-release") |
|
implementation("com.huawei.hms:push:6.7.0.300") |
|
} |
|
|
|
MobSDK { |
|
appKey "m33ee7650da86a" |
|
appSecret "876f2eaebfd2a88c89d5fc294397838c" |
|
spEdition "fp" |
|
|
|
ShareSDK { |
|
|
|
devInfo { |
|
Wechat { |
|
id 4 |
|
sortId 4 |
|
appId "wx3b269e795ed23e5f" |
|
appSecret "64020361b8ec4c99936c0e3999a9f249" |
|
userName "gh_afb25ac019c9" |
|
path "pages/index/index.html?id=1" |
|
withShareTicket true |
|
miniprogramType 0 |
|
bypassApproval false |
|
enable true |
|
} |
|
WechatMoments { |
|
id 3 |
|
sortId 3 |
|
appId "wx3b269e795ed23e5f" |
|
appSecret "64020361b8ec4c99936c0e3999a9f249" |
|
bypassApproval false |
|
enable true |
|
} |
|
Facebook { |
|
id 8 |
|
sortId 8 |
|
appKey "523308712059457" |
|
appSecret "d3a1b6377100871799d8973fbe84794a" |
|
callbackUri "https://mob.com" |
|
shareByAppClient true |
|
enable true |
|
} |
|
Line { |
|
id 2 |
|
sortId 2 |
|
// appKey "1656257249" |
|
// appSecret "7f160c9686672a50b5952364a8553f99" |
|
appKey "1656257047" |
|
appSecret "fd93cb8f12b285b80c7c67bdee8bd091" |
|
callbackUri "https://mob.com" |
|
callbackscheme "huixiang" |
|
shareByAppClient true |
|
enable true |
|
} |
|
} |
|
} |
|
}
|
|
|