Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[tool] Build all_packages command against Flutter Android SDK version…
… to match example apps
  • Loading branch information
jmagman committed Feb 18, 2025
commit 584fc706e3075c8b47e2d0eacd93b1e081858dae
4 changes: 2 additions & 2 deletions script/tool/lib/src/create_all_packages_app_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ dependencies {}
gradleFile,
replacements: <String, List<String>>{
if (gradleFileIsKotlin)
'compileSdk': <String>['compileSdk = 34']
'compileSdk': <String>['compileSdk = flutter.compileSdkVersion']
else ...<String, List<String>>{
'compileSdkVersion': <String>['compileSdk 34'],
'compileSdkVersion': <String>['compileSdk flutter.compileSdkVersion'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From triage: Is one of these the legacy file? If so, can we make that file use compileSdk 35 (just copying discussion from internal conversation).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can we eliminate this conditional logic by just using compileSdk = 35 in both cases? I think that is valid Groovy as well as Kotlin

Copy link
Member Author

@jmagman jmagman Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could swap them both to compileSdk since compileSdkVersion is deprecated.
Never mind, that didn't make sense. I see what you mean.

}
},
regexReplacements: <RegExp, List<String>>{
Expand Down
4 changes: 2 additions & 2 deletions script/tool/test/create_all_packages_app_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ android {
buildGradle,
containsAll(<Matcher>[
contains('This is the legacy file'),
contains('compileSdk 34'),
contains('compileSdk flutter.compileSdkVersion'),
]));
});

Expand Down Expand Up @@ -375,7 +375,7 @@ android {
expect(
buildGradle,
containsAll(<Matcher>[
contains('compileSdk 34'),
contains('compileSdk flutter.compileSdkVersion'),
contains('androidx.lifecycle:lifecycle-runtime'),
]));
});
Expand Down