File tree Expand file tree Collapse file tree 2 files changed +4
-40
lines changed
packages/flutter_tools/templates/app_shared Expand file tree Collapse file tree 2 files changed +4
-40
lines changed Original file line number Diff line number Diff line change @@ -5,24 +5,6 @@ plugins {
55 id "dev.flutter.flutter-gradle-plugin"
66}
77
8- def localProperties = new Properties()
9- def localPropertiesFile = rootProject.file("local.properties")
10- if (localPropertiesFile.exists()) {
11- localPropertiesFile.withReader("UTF-8") { reader ->
12- localProperties.load(reader)
13- }
14- }
15-
16- def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
17- if (flutterVersionCode == null) {
18- flutterVersionCode = "1"
19- }
20-
21- def flutterVersionName = localProperties.getProperty("flutter.versionName")
22- if (flutterVersionName == null) {
23- flutterVersionName = "1.0"
24- }
25-
268android {
279 namespace = "{{androidIdentifier}}"
2810 compileSdk = flutter.compileSdkVersion
@@ -40,8 +22,8 @@ android {
4022 // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
4123 minSdk = flutter.minSdkVersion
4224 targetSdk = flutter.targetSdkVersion
43- versionCode = flutterVersionCode.toInteger()
44- versionName = flutterVersionName
25+ versionCode = flutter.versionCode
26+ versionName = flutter.versionName
4527 }
4628
4729 buildTypes {
Original file line number Diff line number Diff line change @@ -5,24 +5,6 @@ plugins {
55 id "dev.flutter.flutter-gradle-plugin"
66}
77
8- def localProperties = new Properties()
9- def localPropertiesFile = rootProject.file("local.properties")
10- if (localPropertiesFile.exists()) {
11- localPropertiesFile.withReader("UTF-8") { reader ->
12- localProperties.load(reader)
13- }
14- }
15-
16- def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
17- if (flutterVersionCode == null) {
18- flutterVersionCode = "1"
19- }
20-
21- def flutterVersionName = localProperties.getProperty("flutter.versionName")
22- if (flutterVersionName == null) {
23- flutterVersionName = "1.0"
24- }
25-
268android {
279 namespace = "{{androidIdentifier}}"
2810 compileSdk = flutter.compileSdkVersion
@@ -40,8 +22,8 @@ android {
4022 // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
4123 minSdk = flutter.minSdkVersion
4224 targetSdk = flutter.targetSdkVersion
43- versionCode = flutterVersionCode.toInteger()
44- versionName = flutterVersionName
25+ versionCode = flutter.versionCode
26+ versionName = flutter.versionName
4527 }
4628
4729 buildTypes {
You can’t perform that action at this time.
0 commit comments