diff --git a/script/tool/lib/src/create_all_packages_app_command.dart b/script/tool/lib/src/create_all_packages_app_command.dart index 812c32133b2..7608c132480 100644 --- a/script/tool/lib/src/create_all_packages_app_command.dart +++ b/script/tool/lib/src/create_all_packages_app_command.dart @@ -243,9 +243,9 @@ dependencies {} gradleFile, replacements: >{ if (gradleFileIsKotlin) - 'compileSdk': ['compileSdk = 34'] + 'compileSdk': ['compileSdk = flutter.compileSdkVersion'] else ...>{ - 'compileSdkVersion': ['compileSdk 34'], + 'compileSdkVersion': ['compileSdk flutter.compileSdkVersion'], } }, regexReplacements: >{ diff --git a/script/tool/test/create_all_packages_app_command_test.dart b/script/tool/test/create_all_packages_app_command_test.dart index b65371a1971..2e4edeab3b6 100644 --- a/script/tool/test/create_all_packages_app_command_test.dart +++ b/script/tool/test/create_all_packages_app_command_test.dart @@ -342,7 +342,7 @@ android { buildGradle, containsAll([ contains('This is the legacy file'), - contains('compileSdk 34'), + contains('compileSdk flutter.compileSdkVersion'), ])); }); @@ -375,7 +375,7 @@ android { expect( buildGradle, containsAll([ - contains('compileSdk 34'), + contains('compileSdk flutter.compileSdkVersion'), contains('androidx.lifecycle:lifecycle-runtime'), ])); });