Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Upgrade Engine Android SDK to 35 #53574

Merged
merged 34 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
03266f1
Make base engine changes
camsim99 Jun 25, 2024
10e169b
Merge remote-tracking branch 'upstream/main' into eng_35
camsim99 Jun 28, 2024
7ca603d
Correct 35 version
camsim99 Jun 28, 2024
8c0e538
compileSdk
camsim99 Jun 28, 2024
291cb41
Undo packages + change for test
camsim99 Jul 1, 2024
65d90a9
format
camsim99 Jul 1, 2024
e317ce4
Change back to 35
camsim99 Jul 1, 2024
5ce0a8d
format
camsim99 Jul 1, 2024
9b01ee7
Test with buildroot changes
camsim99 Jul 1, 2024
3e09995
Update 35 version to 35v1
camsim99 Jul 10, 2024
7ff2d27
Update impeller test
camsim99 Jul 10, 2024
b530500
Correct Imepller version
camsim99 Jul 10, 2024
35265f8
Test correct root
camsim99 Jul 10, 2024
380766e
Another impeller update
camsim99 Jul 10, 2024
a9b171c
Correct build tools version
camsim99 Jul 10, 2024
d5963e2
Bump target version
camsim99 Jul 10, 2024
ea34633
Bump test runner AGP version
camsim99 Jul 11, 2024
380d49d
bump manifest target
camsim99 Jul 15, 2024
5961681
deps
camsim99 Jul 16, 2024
32339a9
Suppress deprecations
camsim99 Jul 17, 2024
1f07cd8
Undo added code
camsim99 Jul 18, 2024
1aec7b3
Merge remote-tracking branch 'upstream/main' into eng_35
camsim99 Jul 18, 2024
a8e44ac
Merge remote-tracking branch 'upstream/main' into eng_35
camsim99 Jul 18, 2024
d3b8f43
Update AGP, update packages.txt, remove unneeded test case
camsim99 Jul 19, 2024
645d8d2
Merge remote-tracking branch 'upstream/main' into eng_35
camsim99 Jul 19, 2024
77bf104
what is src dir
camsim99 Jul 19, 2024
53ee46d
Correct directory
camsim99 Jul 22, 2024
ca1611b
Merge remote-tracking branch 'upstream/main' into eng_35
camsim99 Jul 22, 2024
8edba5f
Merge branch 'main' into eng_35
camsim99 Jul 23, 2024
7fecb2a
Update buildroot commit
camsim99 Jul 23, 2024
ff12cf4
Merge remote-tracking branch 'refs/remotes/origin/eng_35' into eng_35
camsim99 Jul 23, 2024
7d37adc
Merge remote-tracking branch 'upstream/main' into eng_35
camsim99 Jul 23, 2024
7adc7b8
Temporarily undo deps change
camsim99 Jul 23, 2024
1635d85
Update DEPS entry
camsim99 Jul 23, 2024
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
6 changes: 3 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ allowed_hosts = [
]

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '327906297b49980748ea1956019829e7c434a03e',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '91c259d5ee56c24fb870cf7be7d041bb9b8e139f',

'src/flutter/third_party/depot_tools':
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7',
Expand Down Expand Up @@ -734,7 +734,7 @@ deps = {
{
# See tools/gradle/README.md for update instructions.
# Version here means the CIPD tag.
'version': 'version:8.3',
'version': 'version:8.9',
'package': 'flutter/gradle'
}
],
Expand Down Expand Up @@ -774,7 +774,7 @@ deps = {
'packages': [
{
'package': 'flutter/android/sdk/all/${{platform}}',
'version': 'version:34v7'
'version': 'version:35v1'
}
],
'condition': 'download_android_deps',
Expand Down
4 changes: 2 additions & 2 deletions ci/test/ban_generated_plugin_registrant_java_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ trap cleanup EXIT
echo "PASS: ban_generated_plugin_registrant_java failed as expected"

# Create a file in SRC_DIR/third_party, that should be OK.
echo "Creating file ./src/third_party/GeneratedPluginRegistrant.java"
touch "$SRC_DIR/third_party/GeneratedPluginRegistrant.java"
echo "Creating file ./src/flutter/third_party/GeneratedPluginRegistrant.java"
touch "$SRC_DIR/flutter/third_party/GeneratedPluginRegistrant.java"

# Run the ban script, expecting it to succeed.
"$FLUTTER_DIR/ci/ban_generated_plugin_registrant_java.sh" > /dev/null 2>&1 || {
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.flutter.app" android:versionCode="1" android:versionName="0.0.1">

<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="35" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true" />
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
apply plugin: "com.android.library"

android {
compileSdkVersion 34
compileSdk 35

defaultConfig {
minSdkVersion 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public interface PlatformViewsHandler {
* The ID returned by {@code createForTextureLayer} to indicate that the requested texture mode
* was not available and the view creation fell back to {@code PlatformViewLayer} mode.
*
* This can only be returned if the {@link PlatformViewCreationRequest} sets
* This can only be returned if the {@code PlatformViewCreationRequest} sets
* {@code TEXTURE_WITH_HYBRID_FALLBACK} as the requested display mode.
*/
static final long NON_TEXTURE_FALLBACK = -2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,9 @@ public void itForwardsOnUserLeaveHintToFlutterEngine() {
}

@Test
@SuppressWarnings("deprecation")
// TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_LOW,
// TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL
public void itNotifiesDartExecutorAndSendsMessageOverSystemChannelWhenToldToTrimMemory() {
// Create the real object that we're testing.
FlutterActivityAndFragmentDelegate delegate = new FlutterActivityAndFragmentDelegate(mockHost);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ public void itRemovesListenerWhenSurfaceTextureEntryReleased() {
}

@Test
@SuppressWarnings("deprecation")
// TRIM_MEMORY_COMPLETE
public void itNotifySurfaceTextureEntryWhenMemoryPressureWarning() {
// Setup the test.
FlutterRenderer flutterRenderer = engineRule.getFlutterEngine().getRenderer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ public void platformPlugin_hasStrings() {
}

@Config(sdk = API_LEVELS.API_29)
@SuppressWarnings("deprecation")
// setStatusBarColor, setNavigationBarColor, setNavigationBarDividerColor,
// setStatusBarContrastEnforced, setNavigationBarContrastEnforced
@Test
public void setNavigationBarDividerColor() {
View fakeDecorView = mock(View.class);
Expand Down
4 changes: 2 additions & 2 deletions shell/platform/android/test_runner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:8.0.1"
classpath "com.android.tools.build:gradle:8.5.0"
}
}

Expand Down Expand Up @@ -33,7 +33,7 @@ println "=========================================="

android {
namespace 'io.flutter.app.test'
compileSdkVersion 34
compileSdk 35

defaultConfig {
minSdkVersion 21
Expand Down
4 changes: 2 additions & 2 deletions testing/android/native_activity/native_activity.gni
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import("//build/config/android/config.gni")
import("//flutter/tools/templater/templater.gni")

android_buildtools =
"//flutter/third_party/android_tools/sdk/build-tools/34.0.0"
"//flutter/third_party/android_tools/sdk/build-tools/35.0.0-rc4"
aapt2 = "$android_buildtools/aapt2"
zipalign = "$android_buildtools/zipalign"
apksigner = "$android_buildtools/apksigner"
android_jar =
"//flutter/third_party/android_tools/sdk/platforms/android-34/android.jar"
"//flutter/third_party/android_tools/sdk/platforms/android-35/android.jar"
src_root = "//flutter/testing/android/native_activity"

# A drop in replacement for an executable or shared library target. Providing a
Expand Down
6 changes: 3 additions & 3 deletions testing/scenario_app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ android {
// The others are irrelevant for a test application.
disable 'UnpackedNativeCode','MissingApplicationIcon','GoogleAppIndexingApiWarning','GoogleAppIndexingWarning','GradleDependency','NewerVersionAvailable','Registered'
}
buildToolsVersion = '34.0.0'
compileSdkVersion 34
buildToolsVersion = '35.0.0-rc4'
compileSdk 35
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
applicationId 'dev.flutter.scenarios'
minSdkVersion 21
targetSdkVersion 34
targetSdkVersion 35
versionCode 1
versionName '1.0'
testInstrumentationRunner 'dev.flutter.TestRunner'
Expand Down
6 changes: 3 additions & 3 deletions tools/android_sdk/packages.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
platforms;android-34:platforms
platforms;android-35:platforms
cmdline-tools;latest:cmdline-tools
build-tools;34.0.0:build-tools
build-tools;35.0.0-rc4:build-tools
platform-tools:platform-tools
tools:tools
ndk;26.1.10909125:ndk
ndk;26.3.11579264:ndk
2 changes: 1 addition & 1 deletion tools/cipd/android_embedding_bundle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ allprojects {
apply plugin: "com.android.application"

android {
compileSdkVersion 34
compileSdk 35
}

configurations {
Expand Down
2 changes: 1 addition & 1 deletion tools/javadoc/gen_javadoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def main():
os.makedirs(args.out_dir)

android_jar_path = os.path.join(
args.src_dir, 'flutter', 'third_party', 'android_tools', 'sdk', 'platforms', 'android-34',
args.src_dir, 'flutter', 'third_party', 'android_tools', 'sdk', 'platforms', 'android-35',
'android.jar'
)
if not os.path.exists(android_jar_path):
Expand Down