reads min/target sdk versions from localproperties (#98450)
This commit is contained in:
@@ -25,6 +25,16 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
def flutterMinSdkVersion = localProperties.getProperty('flutter.minSdkVersion')
|
||||
if (flutterMinSdkVersion == null) {
|
||||
flutterMinSdkVersion = flutter.minSdkVersion
|
||||
}
|
||||
|
||||
def flutterTargetSdkVersion = localProperties.getProperty('flutter.targetSdkVersion')
|
||||
if (flutterTargetSdkVersion == null) {
|
||||
flutterTargetSdkVersion = flutter.targetSdkVersion
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
@@ -37,8 +47,8 @@ android {
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "{{androidIdentifier}}"
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
minSdkVersion flutterMinSdkVersion
|
||||
targetSdkVersion flutterTargetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user