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.

101 lines
2.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply from: '../MobSDK.gradle'
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "cn.sharesdk.demo"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
config {
keyAlias 'demokey.keystore'
keyPassword '123456'
storeFile file('../demokey.keystore')
storePassword '123456'
}
release {
keyAlias 'demokey.keystore'
keyPassword '123456'
storeFile file('../demokey.keystore')
storePassword '123456'
}
debug {
keyAlias 'demokey.keystore'
keyPassword '123456'
storeFile file('../demokey.keystore')
storePassword '123456'
}
}
buildTypes {
release {
ndk{
//这里其实我觉可以直接是用"armeabi-v7a",但国内几个大哥之前使用的都是"armeabi"
abiFilters "armeabi"
}
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//signingConfig signingConfigs.release
signingConfig signingConfigs.debug
}
debug {
ndk {
//这里要加上否则debug包会出问题,后面三个为可选x86建议加上不然部分模拟器回报错
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86"
}
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//signingConfig signingConfigs.release
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
}