70 lines
2.1 KiB
Dart
70 lines
2.1 KiB
Dart
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"
|
||
|
||
android {
|
||
compileSdkVersion 28
|
||
|
||
lintOptions {
|
||
disable 'InvalidPackage'
|
||
}
|
||
|
||
defaultConfig {
|
||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||
applicationId "com.finogeeks.finclip.demo"
|
||
minSdkVersion 21
|
||
targetSdkVersion 28
|
||
versionCode flutterVersionCode.toInteger()
|
||
versionName flutterVersionName
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
// TODO: Add your own signing config for the release build.
|
||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||
signingConfig signingConfigs.debug
|
||
}
|
||
}
|
||
packagingOptions {
|
||
// libsdkcore.so是被加固过的,不能被压缩,否则加载动态库时会报错
|
||
doNotStrip "*/x86/libsdkcore.so"
|
||
doNotStrip "*/x86_64/libsdkcore.so"
|
||
doNotStrip "*/armeabi/libsdkcore.so"
|
||
doNotStrip "*/armeabi-v7a/libsdkcore.so"
|
||
doNotStrip "*/arm64-v8a/libsdkcore.so"
|
||
}
|
||
}
|
||
|
||
flutter {
|
||
source '../..'
|
||
}
|
||
|
||
dependencies {
|
||
testImplementation 'junit:junit:4.12'
|
||
androidTestImplementation 'androidx.test:runner:1.1.0'
|
||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
||
}
|