diff --git a/.ci.yaml b/.ci.yaml index b6b83d5019c1f..b88edd33df1ee 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -27,7 +27,7 @@ platform_properties: # CIPD flutter/java/openjdk/$platform dependencies: >- [ - {"dependency": "open_jdk", "version": "version:11"}, + {"dependency": "open_jdk", "version": "version:17"}, {"dependency": "gradle_cache", "version": "none"} ] device_type: none @@ -49,7 +49,7 @@ platform_properties: # CIPD flutter/java/openjdk/$platform dependencies: >- [ - {"dependency": "open_jdk", "version": "version:11"} + {"dependency": "open_jdk", "version": "version:17"} ] device_type: none cpu: x86 @@ -76,7 +76,7 @@ platform_properties: # CIPD flutter/java/openjdk/$platform dependencies: >- [ - {"dependency": "open_jdk", "version": "version:11"} + {"dependency": "open_jdk", "version": "version:17"} ] device_type: none os: Windows-10 diff --git a/DEPS b/DEPS index e3eaa94502258..df855580980fa 100644 --- a/DEPS +++ b/DEPS @@ -262,7 +262,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '5ced4367fee2721f6eda34802dc28b1335637c63', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '44ca359ea6fada2fa1bb007b81994fa4dc8ce2ec', 'src/flutter/third_party/rapidjson': Var('fuchsia_git') + '/third_party/rapidjson' + '@' + 'ef3564c5c8824989393b87df25355baf35ff544b', @@ -719,7 +719,7 @@ deps = { 'packages': [ { 'package': 'flutter/android/sdk/all/${{platform}}', - 'version': 'version:33v6' + 'version': 'version:34v3' } ], 'condition': 'download_android_deps', @@ -751,7 +751,7 @@ deps = { 'packages': [ { 'package': 'flutter/java/openjdk/${{platform}}', - 'version': 'version:11' + 'version': 'version:17' } ], 'condition': 'download_android_deps', diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterView.java b/shell/platform/android/io/flutter/embedding/android/FlutterView.java index f5393bbaa43a0..4cfa3c8839ddc 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterView.java @@ -233,7 +233,7 @@ public FlutterView(@NonNull Context context, @NonNull RenderMode renderMode) { renderSurface = flutterTextureView; } else { throw new IllegalArgumentException( - String.format("RenderMode not supported with this constructor: %s", renderMode)); + "RenderMode not supported with this constructor: " + renderMode); } init(); @@ -327,7 +327,7 @@ public FlutterView( renderSurface = flutterTextureView; } else { throw new IllegalArgumentException( - String.format("RenderMode not supported with this constructor: %s", renderMode)); + "RenderMode not supported with this constructor: " + renderMode); } init(); diff --git a/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManager.java b/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManager.java index 989566872de04..705becaa96c19 100644 --- a/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManager.java +++ b/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManager.java @@ -330,17 +330,17 @@ public void installDeferredComponent(int loadingUnitId, @Nullable String compone case SplitInstallErrorCode.NETWORK_ERROR: flutterJNI.deferredComponentInstallFailure( loadingUnitId, - String.format( - "Install of deferred component module \"%s\" failed with a network error", - componentName), + "Install of deferred component module \"" + + componentName + + "\" failed with a network error", true); break; case SplitInstallErrorCode.MODULE_UNAVAILABLE: flutterJNI.deferredComponentInstallFailure( loadingUnitId, - String.format( - "Install of deferred component module \"%s\" failed as it is unavailable", - componentName), + "Install of deferred component module \"" + + componentName + + "\" failed as it is unavailable", false); break; default: diff --git a/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java b/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java index 08d52867eb2d4..b7ca559ac7c64 100644 --- a/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java +++ b/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java @@ -51,7 +51,7 @@ * EmbeddedView */ @Keep -@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) +@TargetApi(Build.VERSION_CODES.KITKAT) class SingleViewPresentation extends Presentation { private static final String TAG = "PlatformViewsController"; diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java index 9f9ecd6d63774..30dd648beac6e 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java @@ -485,7 +485,7 @@ public void itReleaseEngineWhenOnDestroy() { } @Test - @Config(minSdk = Build.VERSION_CODES.JELLY_BEAN, maxSdk = Build.VERSION_CODES.P) + @Config(minSdk = Build.VERSION_CODES.KITKAT, maxSdk = Build.VERSION_CODES.P) public void fullyDrawn_beforeAndroidQ() { Intent intent = FlutterActivityWithReportFullyDrawn.createDefaultIntent(ctx); ActivityController activityController = diff --git a/shell/platform/android/test/io/flutter/plugin/localization/LocalizationPluginTest.java b/shell/platform/android/test/io/flutter/plugin/localization/LocalizationPluginTest.java index a1e8a12716816..9b3d7ee921b7e 100644 --- a/shell/platform/android/test/io/flutter/plugin/localization/LocalizationPluginTest.java +++ b/shell/platform/android/test/io/flutter/plugin/localization/LocalizationPluginTest.java @@ -238,7 +238,7 @@ public void computePlatformResolvedLocale_fromAndroidN() { // Tests the legacy pre API 24 algorithm. @Test @Config( - minSdk = Build.VERSION_CODES.JELLY_BEAN, + minSdk = Build.VERSION_CODES.KITKAT, maxSdk = Build.VERSION_CODES.M, qualifiers = "es-rMX") public void computePlatformResolvedLocale_emptySupportedLocales_beforeAndroidN() { @@ -252,7 +252,7 @@ public void computePlatformResolvedLocale_emptySupportedLocales_beforeAndroidN() } @Test - @Config(minSdk = Build.VERSION_CODES.JELLY_BEAN, maxSdk = Build.VERSION_CODES.M, qualifiers = "") + @Config(minSdk = Build.VERSION_CODES.KITKAT, maxSdk = Build.VERSION_CODES.M, qualifiers = "") public void computePlatformResolvedLocale_selectFirstLocaleWhenNoUserSetting_beforeAndroidN() { FlutterJNI flutterJNI = new FlutterJNI(); DartExecutor dartExecutor = mock(DartExecutor.class); @@ -273,7 +273,7 @@ public void computePlatformResolvedLocale_selectFirstLocaleWhenNoUserSetting_bef @Test @Config( - minSdk = Build.VERSION_CODES.JELLY_BEAN, + minSdk = Build.VERSION_CODES.KITKAT, maxSdk = Build.VERSION_CODES.M, qualifiers = "fr-rCH") public void computePlatformResolvedLocale_selectFirstLocaleWhenNoExactMatch_beforeAndroidN() { @@ -299,7 +299,7 @@ public void computePlatformResolvedLocale_selectFirstLocaleWhenNoExactMatch_befo @Test @Config( - minSdk = Build.VERSION_CODES.JELLY_BEAN, + minSdk = Build.VERSION_CODES.KITKAT, maxSdk = Build.VERSION_CODES.M, qualifiers = "it-rIT") public void computePlatformResolvedLocale_selectExactMatchLocale_beforeAndroidN() { @@ -325,7 +325,7 @@ public void computePlatformResolvedLocale_selectExactMatchLocale_beforeAndroidN( @Test @Config( - minSdk = Build.VERSION_CODES.JELLY_BEAN, + minSdk = Build.VERSION_CODES.KITKAT, maxSdk = Build.VERSION_CODES.M, qualifiers = "fr-rCH") public void computePlatformResolvedLocale_selectOnlyLanguageLocale_beforeAndroidN() { @@ -351,35 +351,35 @@ public void computePlatformResolvedLocale_selectOnlyLanguageLocale_beforeAndroid } // Tests the legacy pre API 21 algorithm. - @Config(sdk = 16) + @Config(sdk = Build.VERSION_CODES.KITKAT) @Test public void localeFromString_languageOnly() { Locale locale = LocalizationPlugin.localeFromString("en"); assertEquals(locale, new Locale("en")); } - @Config(sdk = 16) + @Config(sdk = Build.VERSION_CODES.KITKAT) @Test public void localeFromString_languageAndCountry() { Locale locale = LocalizationPlugin.localeFromString("en-US"); assertEquals(locale, new Locale("en", "US")); } - @Config(sdk = 16) + @Config(sdk = Build.VERSION_CODES.KITKAT) @Test public void localeFromString_languageCountryAndVariant() { Locale locale = LocalizationPlugin.localeFromString("zh-Hans-CN"); assertEquals(locale, new Locale("zh", "CN", "Hans")); } - @Config(sdk = 16) + @Config(sdk = Build.VERSION_CODES.KITKAT) @Test public void localeFromString_underscore() { Locale locale = LocalizationPlugin.localeFromString("zh_Hans_CN"); assertEquals(locale, new Locale("zh", "CN", "Hans")); } - @Config(sdk = 16) + @Config(sdk = Build.VERSION_CODES.KITKAT) @Test public void localeFromString_additionalVariantsAreIgnored() { Locale locale = LocalizationPlugin.localeFromString("de-DE-u-co-phonebk"); diff --git a/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java b/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java index 3a77e6ae68cc1..23b7fbf5b6a98 100644 --- a/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java +++ b/shell/platform/android/test/io/flutter/plugin/platform/PlatformPluginTest.java @@ -52,7 +52,7 @@ public class PlatformPluginTest { private final Context ctx = ApplicationProvider.getApplicationContext(); - @Config(sdk = 16) + @Config(sdk = Build.VERSION_CODES.KITKAT) @Test public void itIgnoresNewHapticEventsOnOldAndroidPlatforms() { View fakeDecorView = mock(View.class); @@ -70,7 +70,7 @@ public void itIgnoresNewHapticEventsOnOldAndroidPlatforms() { platformPlugin.vibrateHapticFeedback(PlatformChannel.HapticFeedbackType.SELECTION_CLICK); } - @Config(sdk = 29) + @Config(sdk = Build.VERSION_CODES.Q) @Test public void platformPlugin_getClipboardData() throws IOException { ClipboardManager clipboardManager = ctx.getSystemService(ClipboardManager.class); @@ -100,7 +100,7 @@ public void platformPlugin_getClipboardData() throws IOException { @SuppressWarnings("deprecation") // ClipboardManager.getText - @Config(sdk = 28) + @Config(sdk = Build.VERSION_CODES.P) @Test public void platformPlugin_hasStrings() { ClipboardManager clipboardManager = spy(ctx.getSystemService(ClipboardManager.class)); @@ -154,7 +154,7 @@ public void platformPlugin_hasStrings() { verify(clipboardManager, never()).getText(); } - @Config(sdk = 29) + @Config(sdk = Build.VERSION_CODES.Q) @Test public void setNavigationBarDividerColor() { View fakeDecorView = mock(View.class); @@ -229,7 +229,7 @@ public void setNavigationBarDividerColor() { } } - @Config(sdk = 30) + @Config(sdk = Build.VERSION_CODES.R) @Test public void setNavigationBarIconBrightness() { if (Build.VERSION.SDK_INT >= 30) { @@ -276,7 +276,7 @@ public void setNavigationBarIconBrightness() { } } - @Config(sdk = 30) + @Config(sdk = Build.VERSION_CODES.R) @Test public void setStatusBarIconBrightness() { if (Build.VERSION.SDK_INT >= 30) { @@ -323,7 +323,7 @@ public void setStatusBarIconBrightness() { @SuppressWarnings("deprecation") // SYSTEM_UI_FLAG_*, setSystemUiVisibility - @Config(sdk = 29) + @Config(sdk = Build.VERSION_CODES.Q) @Test public void setSystemUiMode() { View fakeDecorView = mock(View.class); @@ -440,7 +440,7 @@ public void setSystemUiModeListener_overlaysAreVisible() { @SuppressWarnings("deprecation") // SYSTEM_UI_FLAG_*, setSystemUiVisibility - @Config(sdk = 28) + @Config(sdk = Build.VERSION_CODES.P) @Test public void doNotEnableEdgeToEdgeOnOlderSdk() { View fakeDecorView = mock(View.class); @@ -462,7 +462,7 @@ public void doNotEnableEdgeToEdgeOnOlderSdk() { @SuppressWarnings("deprecation") // FLAG_TRANSLUCENT_STATUS, FLAG_TRANSLUCENT_NAVIGATION - @Config(sdk = 29) + @Config(sdk = Build.VERSION_CODES.Q) @Test public void verifyWindowFlagsSetToStyleOverlays() { View fakeDecorView = mock(View.class); diff --git a/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java b/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java index 046682797623f..d27e08bbbdc97 100644 --- a/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java +++ b/shell/platform/android/test/io/flutter/plugin/platform/SingleViewPresentationTest.java @@ -4,7 +4,7 @@ package io.flutter.plugin.platform; -import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1; +import static android.os.Build.VERSION_CODES.KITKAT; import static android.os.Build.VERSION_CODES.P; import static android.os.Build.VERSION_CODES.R; import static org.junit.Assert.assertEquals; @@ -28,7 +28,7 @@ @TargetApi(P) public class SingleViewPresentationTest { @Test - @Config(minSdk = JELLY_BEAN_MR1, maxSdk = R) + @Config(minSdk = KITKAT, maxSdk = R) public void returnsOuterContextInputMethodManager() { // There's a bug in Android Q caused by the IMM being instanced per display. // https://github.com/flutter/flutter/issues/38375. We need the context returned by @@ -59,7 +59,7 @@ public void returnsOuterContextInputMethodManager() { } @Test - @Config(minSdk = JELLY_BEAN_MR1, maxSdk = R) + @Config(minSdk = KITKAT, maxSdk = R) public void returnsOuterContextInputMethodManager_createDisplayContext() { // The IMM should also persist across display contexts created from the base context. diff --git a/shell/platform/android/test_runner/build.gradle b/shell/platform/android/test_runner/build.gradle index 53a537f874c15..609d4810f6a4f 100644 --- a/shell/platform/android/test_runner/build.gradle +++ b/shell/platform/android/test_runner/build.gradle @@ -32,10 +32,10 @@ println "AVAILABLE PROCESSORS: $availableProcessors" println "==========================================" android { - compileSdkVersion 33 + compileSdkVersion 34 defaultConfig { - minSdkVersion 16 + minSdkVersion 19 } compileOptions { diff --git a/testing/android_background_image/android/app/build.gradle b/testing/android_background_image/android/app/build.gradle index c7346c23e8422..7a72a25fe99e6 100644 --- a/testing/android_background_image/android/app/build.gradle +++ b/testing/android_background_image/android/app/build.gradle @@ -16,16 +16,16 @@ android { // The others are irrelevant for a test application. disable 'UnpackedNativeCode','MissingApplicationIcon','GoogleAppIndexingApiWarning','GoogleAppIndexingWarning','GradleDependency','NewerVersionAvailable' } - buildToolsVersion = '33.0.0' - compileSdkVersion 33 + buildToolsVersion = '34.0.0' + compileSdkVersion 34 compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } defaultConfig { applicationId 'dev.flutter.android_background_image' - minSdkVersion 16 - targetSdkVersion 33 + minSdkVersion 19 + targetSdkVersion 34 versionCode 1 versionName '1.0' } diff --git a/testing/scenario_app/android/app/build.gradle b/testing/scenario_app/android/app/build.gradle index 5f2a94523b996..2465157ed5ff4 100644 --- a/testing/scenario_app/android/app/build.gradle +++ b/testing/scenario_app/android/app/build.gradle @@ -18,16 +18,16 @@ android { // The others are irrelevant for a test application. disable 'UnpackedNativeCode','MissingApplicationIcon','GoogleAppIndexingApiWarning','GoogleAppIndexingWarning','GradleDependency','NewerVersionAvailable','Registered' } - buildToolsVersion = '33.0.0' - compileSdkVersion 33 + buildToolsVersion = '34.0.0' + compileSdkVersion 34 compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } defaultConfig { applicationId 'dev.flutter.scenarios' - minSdkVersion 18 - targetSdkVersion 33 + minSdkVersion 19 + targetSdkVersion 34 versionCode 1 versionName '1.0' testInstrumentationRunner 'dev.flutter.TestRunner' diff --git a/tools/android_lint/baseline.xml b/tools/android_lint/baseline.xml index 41e7e89b6a6f4..11ed846154170 100644 --- a/tools/android_lint/baseline.xml +++ b/tools/android_lint/baseline.xml @@ -1,5 +1,5 @@ - + @@ -19,7 +19,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -30,7 +30,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -41,7 +41,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -52,7 +52,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> @@ -78,6 +78,17 @@ column="82"/> + + + + @@ -96,19 +107,8 @@ errorLine2=" ~~~~~~~~~~~~"> - - - - diff --git a/tools/android_lint/bin/main.dart b/tools/android_lint/bin/main.dart index 88cfd040e231b..d6b6191b73e98 100644 --- a/tools/android_lint/bin/main.dart +++ b/tools/android_lint/bin/main.dart @@ -73,7 +73,7 @@ Future runLint(ArgParser argParser, ArgResults argResults) async { - + '''); for (final FileSystemEntity entity in androidDir.listSync(recursive: true)) { @@ -95,7 +95,7 @@ Future runLint(ArgParser argParser, ArgResults argResults) async { final List lintArgs = [ path.join(androidSdkDir.path, 'cmdline-tools', 'latest', 'bin', 'lint'), '--project', projectXmlPath, - '--compile-sdk-version', '33', + '--compile-sdk-version', '34', '--showall', '--exitcode', // Set non-zero exit code on errors '-Wall', diff --git a/tools/android_lint/project.xml b/tools/android_lint/project.xml index c2a754adebd14..f3eeafdb2b6b2 100644 --- a/tools/android_lint/project.xml +++ b/tools/android_lint/project.xml @@ -2,7 +2,7 @@ - + @@ -53,6 +53,7 @@ + @@ -84,6 +85,7 @@ + @@ -93,6 +95,7 @@ + @@ -102,7 +105,9 @@ - + + + @@ -110,11 +115,11 @@ - + @@ -141,6 +146,7 @@ + diff --git a/tools/android_sdk/packages.txt b/tools/android_sdk/packages.txt index b257101a496af..43a2526314c4e 100644 --- a/tools/android_sdk/packages.txt +++ b/tools/android_sdk/packages.txt @@ -1,6 +1,6 @@ -platforms;android-33:platforms +platforms;android-34:platforms cmdline-tools;latest:cmdline-tools -build-tools;33.0.0:build-tools +build-tools;34.0.0:build-tools platform-tools:platform-tools tools:tools -ndk;22.1.7171670:ndk \ No newline at end of file +ndk;22.1.7171670:ndk diff --git a/tools/cipd/android_embedding_bundle/build.gradle b/tools/cipd/android_embedding_bundle/build.gradle index f110332990e12..9b93d0a0afbdf 100644 --- a/tools/cipd/android_embedding_bundle/build.gradle +++ b/tools/cipd/android_embedding_bundle/build.gradle @@ -33,7 +33,7 @@ allprojects { apply plugin: "com.android.application" android { - compileSdkVersion 33 + compileSdkVersion 34 } configurations { diff --git a/tools/javadoc/gen_javadoc.py b/tools/javadoc/gen_javadoc.py index 92b49ad77118d..739de78389ea5 100755 --- a/tools/javadoc/gen_javadoc.py +++ b/tools/javadoc/gen_javadoc.py @@ -58,7 +58,7 @@ def main(): classpath = [ args.android_source_root, os.path.join( - args.third_party, 'android_tools/sdk/platforms/android-33/android.jar' + args.third_party, 'android_tools/sdk/platforms/android-34/android.jar' ), os.path.join( args.third_party, 'android_embedding_dependencies', 'lib', '*'