Skip to content

Commit e1d6f7e

Browse files
authored
migrate {min,target,compile}SdkVersion to {min,target,compile}Sdk (#141537)
Inspired by #137621.
1 parent 90ced90 commit e1d6f7e

File tree

10 files changed

+16
-15
lines changed

10 files changed

+16
-15
lines changed

packages/flutter_tools/templates/app_shared/android-java.tmpl/app/build.gradle.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ android {
3737
applicationId "{{androidIdentifier}}"
3838
// You can update the following values to match your application needs.
3939
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
40-
minSdkVersion flutter.minSdkVersion
41-
targetSdkVersion flutter.targetSdkVersion
40+
minSdk flutter.minSdkVersion
41+
targetSdk flutter.targetSdkVersion
4242
versionCode flutterVersionCode.toInteger()
4343
versionName flutterVersionName
4444
}

packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ android {
4545
applicationId "{{androidIdentifier}}"
4646
// You can update the following values to match your application needs.
4747
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48-
minSdkVersion flutter.minSdkVersion
49-
targetSdkVersion flutter.targetSdkVersion
48+
minSdk flutter.minSdkVersion
49+
targetSdk flutter.targetSdkVersion
5050
versionCode flutterVersionCode.toInteger()
5151
versionName flutterVersionName
5252
}

packages/flutter_tools/templates/module/android/deferred_component/build.gradle.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ android {
3434
}
3535

3636
defaultConfig {
37-
minSdkVersion flutter.minSdkVersion
38-
targetSdkVersion flutter.targetSdkVersion
37+
minSdk flutter.minSdkVersion
38+
targetSdk flutter.targetSdkVersion
3939
versionCode flutterVersionCode.toInteger()
4040
versionName flutterVersionName
4141
}

packages/flutter_tools/templates/module/android/gradle/build.gradle.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ android {
3131

3232
compileSdk {{compileSdkVersion}}
3333
defaultConfig {
34-
minSdkVersion {{minSdkVersion}}
34+
minSdk {{minSdkVersion}}
3535
}
3636
}
3737

packages/flutter_tools/templates/module/android/host_app_common/app.tmpl/build.gradle.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ android {
1717

1818
defaultConfig {
1919
applicationId "{{androidIdentifier}}.host"
20-
minSdkVersion {{minSdkVersion}}
21-
targetSdkVersion {{targetSdkVersion}}
20+
minSdk {{minSdkVersion}}
21+
targetSdk {{targetSdkVersion}}
2222
versionCode 1
2323
versionName "1.0"
2424
}

packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ android {
4444
}
4545

4646
defaultConfig {
47-
minSdkVersion flutter.minSdkVersion
48-
targetSdkVersion flutter.targetSdkVersion
47+
minSdk flutter.minSdkVersion
48+
targetSdk flutter.targetSdkVersion
4949
versionCode flutterVersionCode.toInteger()
5050
versionName flutterVersionName
5151
}

packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
}
3535

3636
defaultConfig {
37-
minSdkVersion {{minSdkVersion}}
37+
minSdk {{minSdkVersion}}
3838
}
3939

4040
dependencies {

packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ android {
4646
}
4747

4848
defaultConfig {
49-
minSdkVersion {{minSdkVersion}}
49+
minSdk {{minSdkVersion}}
5050
}
5151

5252
dependencies {

packages/flutter_tools/templates/plugin_ffi/android.tmpl/build.gradle.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ android {
6060
}
6161

6262
defaultConfig {
63-
minSdkVersion {{minSdkVersion}}
63+
minSdk {{minSdkVersion}}
6464
}
6565
}

packages/flutter_tools/test/commands.shard/permeable/create_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2889,7 +2889,8 @@ void main() {
28892889

28902890
expect(buildContent.contains('compileSdk flutter.compileSdkVersion'), true);
28912891
expect(buildContent.contains('ndkVersion flutter.ndkVersion'), true);
2892-
expect(buildContent.contains('targetSdkVersion flutter.targetSdkVersion'), true);
2892+
expect(buildContent.contains('minSdk flutter.minSdkVersion'), true);
2893+
expect(buildContent.contains('targetSdk flutter.targetSdkVersion'), true);
28932894
});
28942895

28952896
testUsingContext('Android Java plugin contains namespace', () async {

0 commit comments

Comments
 (0)