diff --git a/DEPS b/DEPS index e9721c5d14..15961e0da1 100644 --- a/DEPS +++ b/DEPS @@ -277,7 +277,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '915f67999bfb4eb77cf596bbadacdce7868ede49', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'c5f0206b6fd70a85a41718f0bc6481b7c5348026', 'src/flutter/third_party/depot_tools': Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', @@ -745,7 +745,7 @@ deps = { 'dep_type': 'cipd' }, - 'src/third_party/android_tools/trace_to_text': { + 'src/flutter/third_party/android_tools/trace_to_text': { 'packages': [ { # 25.0 downloads for both mac-amd64 and mac-arm64 @@ -759,7 +759,7 @@ deps = { 'dep_type': 'cipd' }, - 'src/third_party/android_tools/google-java-format': { + 'src/flutter/third_party/android_tools/google-java-format': { 'packages': [ { 'package': 'flutter/android/google-java-format', @@ -773,7 +773,7 @@ deps = { 'dep_type': 'cipd', }, - 'src/third_party/android_tools': { + 'src/flutter/third_party/android_tools': { 'packages': [ { 'package': 'flutter/android/sdk/all/${{platform}}', diff --git a/engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn b/engine/src/flutter/build/secondary/flutter/third_party/android_tools/BUILD.gn similarity index 100% rename from engine/src/flutter/build/secondary/third_party/android_tools/BUILD.gn rename to engine/src/flutter/build/secondary/flutter/third_party/android_tools/BUILD.gn diff --git a/engine/src/flutter/build/secondary/third_party/android_ndk/BUILD.gn b/engine/src/flutter/build/secondary/third_party/android_ndk/BUILD.gn index 697d2873a5..84f309869e 100644 --- a/engine/src/flutter/build/secondary/third_party/android_ndk/BUILD.gn +++ b/engine/src/flutter/build/secondary/third_party/android_ndk/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("cpu_features") { - public_configs = [ "//third_party/android_tools:cpu_features_include" ] - deps = [ "//third_party/android_tools:cpu_features" ] + public_configs = + [ "//flutter/third_party/android_tools:cpu_features_include" ] + deps = [ "//flutter/third_party/android_tools:cpu_features" ] } diff --git a/engine/src/flutter/build/secondary/third_party/cpu-features/BUILD.gn b/engine/src/flutter/build/secondary/third_party/cpu-features/BUILD.gn index dadee56df8..68cdbbfc3a 100644 --- a/engine/src/flutter/build/secondary/third_party/cpu-features/BUILD.gn +++ b/engine/src/flutter/build/secondary/third_party/cpu-features/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("cpu-features") { - public_configs = [ "//third_party/android_tools:cpu_features_include" ] - deps = [ "//third_party/android_tools:cpu_features" ] + public_configs = + [ "//flutter/third_party/android_tools:cpu_features_include" ] + deps = [ "//flutter/third_party/android_tools:cpu_features" ] } diff --git a/engine/src/flutter/ci/binary_size_treemap.sh b/engine/src/flutter/ci/binary_size_treemap.sh index 971b16b193..769423c5c4 100755 --- a/engine/src/flutter/ci/binary_size_treemap.sh +++ b/engine/src/flutter/ci/binary_size_treemap.sh @@ -22,8 +22,8 @@ if [ "$(uname)" == "Darwin" ]; then else NDK_PLATFORM="linux-x86_64" fi -ADDR2LINE="third_party/android_tools/ndk/toolchains/llvm/prebuilt/$NDK_PLATFORM/bin/llvm-addr2line" -NM="third_party/android_tools/ndk/toolchains/llvm/prebuilt/$NDK_PLATFORM/bin/llvm-nm" +ADDR2LINE="flutter/third_party/android_tools/ndk/toolchains/llvm/prebuilt/$NDK_PLATFORM/bin/llvm-addr2line" +NM="flutter/third_party/android_tools/ndk/toolchains/llvm/prebuilt/$NDK_PLATFORM/bin/llvm-nm" # Run the binary size script from the buildroot directory so the treemap path # navigation will start from there. diff --git a/engine/src/flutter/ci/licenses_golden/excluded_files b/engine/src/flutter/ci/licenses_golden/excluded_files index 36c5b50ffc..415883a4a8 100644 --- a/engine/src/flutter/ci/licenses_golden/excluded_files +++ b/engine/src/flutter/ci/licenses_golden/excluded_files @@ -775,6 +775,7 @@ ../../../flutter/third_party/accessibility/gfx/geometry/vector2d_unittest.cc ../../../flutter/third_party/accessibility/gfx/range/range_unittest.cc ../../../flutter/third_party/accessibility/gfx/test +../../../flutter/third_party/android_tools ../../../flutter/third_party/angle/.clang-format ../../../flutter/third_party/angle/.git ../../../flutter/third_party/angle/.gitattributes @@ -3506,7 +3507,6 @@ ../../../fuchsia/sdk/linux/version_history.json ../../../out ../../../third_party/android_embedding_dependencies -../../../third_party/android_tools ../../../third_party/gradle ../../../third_party/java ../../../third_party/libcxx/.clang-format diff --git a/engine/src/flutter/ci/licenses_golden/licenses_dart b/engine/src/flutter/ci/licenses_golden/licenses_dart index cc07f77b1b..56ada58ec7 100644 --- a/engine/src/flutter/ci/licenses_golden/licenses_dart +++ b/engine/src/flutter/ci/licenses_golden/licenses_dart @@ -4741,7 +4741,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. -You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/33bb0f4b07706af716be119d53dcb085ffbb1e52 +You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/a9cf6a411c717916c4a170fcf7f6836a93a8ea04 /third_party/fallback_root_certificates/ ==================================================================================================== diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index 9be17177f9..37298fe8e1 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 95c63dc7dfaf942506f787b7127d83e5 +Signature: 45060fc168827cc21ff447884cf86d9d diff --git a/engine/src/flutter/shell/platform/android/BUILD.gn b/engine/src/flutter/shell/platform/android/BUILD.gn index 28c78d3c85..0829a94c73 100644 --- a/engine/src/flutter/shell/platform/android/BUILD.gn +++ b/engine/src/flutter/shell/platform/android/BUILD.gn @@ -646,8 +646,8 @@ action("gen_android_javadoc") { rebase_path("."), "--build-config-path", rebase_path(target_gen_dir), - "--third-party", - rebase_path("//third_party"), + "--src-dir", + rebase_path("//"), "--quiet", ] diff --git a/engine/src/flutter/sky/tools/flutter_gdb b/engine/src/flutter/sky/tools/flutter_gdb index ee62dc52fb..b27e8d9b73 100755 --- a/engine/src/flutter/sky/tools/flutter_gdb +++ b/engine/src/flutter/sky/tools/flutter_gdb @@ -25,7 +25,7 @@ previous run for a given device, then you can skip this step by passing --no-pull-libs. """ -ADB_LOCAL_PATH = 'third_party/android_tools/sdk/platform-tools/adb' +ADB_LOCAL_PATH = 'flutter/third_party/android_tools/sdk/platform-tools/adb' def _get_flutter_root(): @@ -86,7 +86,7 @@ class GdbClient(object): SYSTEM_LIBS_PATH = '/tmp/flutter_gdb_device_libs' def _gdb_local_path(self): - GDB_LOCAL_PATH = ('third_party/android_tools/ndk/prebuilt/%s-x86_64/bin/gdb') + GDB_LOCAL_PATH = ('flutter/third_party/android_tools/ndk/prebuilt/%s-x86_64/bin/gdb') if sys.platform.startswith('darwin'): return GDB_LOCAL_PATH % 'darwin' else: @@ -194,7 +194,7 @@ class GdbServer(object): return 1 abi = _get_device_abi(adb_command) - gdb_server_local_path = 'third_party/android_tools/ndk/prebuilt/android-%s/gdbserver/gdbserver' % abi + gdb_server_local_path = 'flutter/third_party/android_tools/ndk/prebuilt/android-%s/gdbserver/gdbserver' % abi # Copy gdbserver to the package's data directory. subprocess.check_call(adb_command + ['push', diff --git a/engine/src/flutter/testing/analyze_core_dump.sh b/engine/src/flutter/testing/analyze_core_dump.sh index 26ec902414..0cf2c9b70b 100755 --- a/engine/src/flutter/testing/analyze_core_dump.sh +++ b/engine/src/flutter/testing/analyze_core_dump.sh @@ -15,7 +15,7 @@ if [ "$UNAME" == "Linux" ]; then if [ -x "$(command -v gdb)" ]; then GDB=gdb else - GDB=$BUILDROOT/third_party/android_tools/ndk/prebuilt/linux-x86_64/bin/gdb + GDB=$BUILDROOT/flutter/third_party/android_tools/ndk/prebuilt/linux-x86_64/bin/gdb fi echo "GDB=$GDB" $GDB $EXE $CORE --batch -ex "thread apply all bt" > $OUTPUT diff --git a/engine/src/flutter/testing/android/native_activity/native_activity.gni b/engine/src/flutter/testing/android/native_activity/native_activity.gni index cbf4d3e751..d5af82452a 100644 --- a/engine/src/flutter/testing/android/native_activity/native_activity.gni +++ b/engine/src/flutter/testing/android/native_activity/native_activity.gni @@ -5,11 +5,13 @@ import("//build/config/android/config.gni") import("//flutter/tools/templater/templater.gni") -android_buildtools = "//third_party/android_tools/sdk/build-tools/34.0.0" +android_buildtools = + "//flutter/third_party/android_tools/sdk/build-tools/34.0.0" aapt2 = "$android_buildtools/aapt2" zipalign = "$android_buildtools/zipalign" apksigner = "$android_buildtools/apksigner" -android_jar = "//third_party/android_tools/sdk/platforms/android-34/android.jar" +android_jar = + "//flutter/third_party/android_tools/sdk/platforms/android-34/android.jar" src_root = "//flutter/testing/android/native_activity" # A drop in replacement for an executable or shared library target. Providing a diff --git a/engine/src/flutter/testing/android_systrace_test.py b/engine/src/flutter/testing/android_systrace_test.py index 2875409703..9acf9b1c01 100755 --- a/engine/src/flutter/testing/android_systrace_test.py +++ b/engine/src/flutter/testing/android_systrace_test.py @@ -83,7 +83,7 @@ def collect_and_validate_trace(adb_path='adb'): print('Validating trace') traceconv = os.path.join( - BUILDROOT_DIR, 'third_party', 'android_tools', 'trace_to_text', 'trace_to_text' + BUILDROOT_DIR, 'flutter', 'third_party', 'android_tools', 'trace_to_text', 'trace_to_text' ) traceconv_output = subprocess.check_output([traceconv, 'systrace', 'trace.pb'], stderr=subprocess.STDOUT, diff --git a/engine/src/flutter/testing/rules/run_gradle.py b/engine/src/flutter/testing/rules/run_gradle.py index d07cbd3c7e..4e23ea5add 100644 --- a/engine/src/flutter/testing/rules/run_gradle.py +++ b/engine/src/flutter/testing/rules/run_gradle.py @@ -21,7 +21,7 @@ GRADLE_BIN = os.path.normpath( ) ANDROID_HOME = os.path.normpath( - os.path.join(SCRIPT_PATH, '..', '..', '..', 'third_party', 'android_tools', 'sdk') + os.path.join(SCRIPT_PATH, '..', '..', 'third_party', 'android_tools', 'sdk') ) if platform.system() == 'Darwin': diff --git a/engine/src/flutter/testing/run_tests.py b/engine/src/flutter/testing/run_tests.py index 1a0f4526be..1fbcd31f84 100755 --- a/engine/src/flutter/testing/run_tests.py +++ b/engine/src/flutter/testing/run_tests.py @@ -710,7 +710,7 @@ def run_java_tests(executable_filter, android_variant='android_debug_unopt'): BUILDROOT_DIR, 'third_party', 'gradle', 'bin', 'gradle.bat' if is_windows() else 'gradle' ) flutter_jar = os.path.join(OUT_DIR, android_variant, 'flutter.jar') - android_home = os.path.join(BUILDROOT_DIR, 'third_party', 'android_tools', 'sdk') + android_home = os.path.join(BUILDROOT_DIR, 'flutter', 'third_party', 'android_tools', 'sdk') build_dir = os.path.join(OUT_DIR, android_variant, 'robolectric_tests', 'build') gradle_cache_dir = os.path.join(OUT_DIR, android_variant, 'robolectric_tests', '.gradle') diff --git a/engine/src/flutter/testing/scenario_app/android/README.md b/engine/src/flutter/testing/scenario_app/android/README.md index d4e4627eec..dc6f0049b3 100644 --- a/engine/src/flutter/testing/scenario_app/android/README.md +++ b/engine/src/flutter/testing/scenario_app/android/README.md @@ -104,14 +104,14 @@ See also: It's highly recommended to use the engine's vendored Android SDK, which once you have the engine set up, you can find at -`$ENGINE/src/third_party/android_tools/sdk`. Testing or running with other -versions of the SDK may work, but it's _not guaranteed_, and might have +`$ENGINE/src/flutter/third_party/android_tools/sdk`. Testing or running with +other versions of the SDK may work, but it's _not guaranteed_, and might have different results. Consider also placing this directory in the `ANDROID_HOME` environment variable: ```sh -export ANDROID_HOME=$ENGINE/src/third_party/android_tools/sdk +export ANDROID_HOME=$ENGINE/src/flutter/third_party/android_tools/sdk ``` ### Device or Emulator diff --git a/engine/src/flutter/testing/scenario_app/bin/utils/options.dart b/engine/src/flutter/testing/scenario_app/bin/utils/options.dart index 852460da64..8de3199dda 100644 --- a/engine/src/flutter/testing/scenario_app/bin/utils/options.dart +++ b/engine/src/flutter/testing/scenario_app/bin/utils/options.dart @@ -186,10 +186,12 @@ extension type const Options._(ArgResults _args) { 'adb', help: 'Path to the Android Debug Bridge (adb) executable. ' 'If the current working directory is within the engine repository, ' - 'defaults to ./third_party/android_tools/sdk/platform-tools/adb.', + 'defaults to ' + './flutter/third_party/android_tools/sdk/platform-tools/adb.', defaultsTo: localEngine != null ? p.join( localEngine.srcDir.path, + 'flutter', 'third_party', 'android_tools', 'sdk', @@ -204,14 +206,16 @@ extension type const Options._(ArgResults _args) { 'ndk-stack', help: 'Path to the NDK stack tool. Defaults to the checked-in version in ' - 'third_party/android_tools if the current working directory is ' - 'within the engine repository on a supported platform.', + 'flutter/third_party/android_tools if the current working ' + 'directory is within the engine repository on a supported ' + 'platform.', defaultsTo: localEngine != null && (io.Platform.isLinux || io.Platform.isMacOS || io.Platform.isWindows) ? p.join( localEngine.srcDir.path, + 'flutter', 'third_party', 'android_tools', 'ndk', diff --git a/engine/src/flutter/tools/android_lint/bin/main.dart b/engine/src/flutter/tools/android_lint/bin/main.dart index d6b6191b73..838b17da6b 100644 --- a/engine/src/flutter/tools/android_lint/bin/main.dart +++ b/engine/src/flutter/tools/android_lint/bin/main.dart @@ -48,12 +48,13 @@ Future runLint(ArgParser argParser, ArgResults argResults) async { } final Directory androidSdkDir = Directory( - path.join(inArgument, 'third_party', 'android_tools', 'sdk'), + path.join(inArgument, 'flutter', 'third_party', 'android_tools', 'sdk'), ); if (!androidSdkDir.existsSync()) { print('The Android SDK for this engine is missing from the ' - 'third_party/android_tools directory. Have you run gclient sync?\n'); + 'flutter/third_party/android_tools directory. Have you run gclient ' + 'sync?\n'); print(argParser.usage); return -1; } diff --git a/engine/src/flutter/tools/javadoc/gen_javadoc.py b/engine/src/flutter/tools/javadoc/gen_javadoc.py index 357bc285fd..cd30594215 100755 --- a/engine/src/flutter/tools/javadoc/gen_javadoc.py +++ b/engine/src/flutter/tools/javadoc/gen_javadoc.py @@ -35,7 +35,7 @@ def main(): parser.add_argument('--out-dir', type=str, required=True) parser.add_argument('--android-source-root', type=str, default=ANDROID_SRC_ROOT) parser.add_argument('--build-config-path', type=str) - parser.add_argument('--third-party', type=str, default='third_party') + parser.add_argument('--src-dir', type=str, default='.') parser.add_argument('--quiet', default=False, action='store_true') args = parser.parse_args() @@ -49,10 +49,18 @@ def main(): if not os.path.exists(args.out_dir): os.makedirs(args.out_dir) + android_jar_path = os.path.join( + args.src_dir, 'flutter', 'third_party', 'android_tools', 'sdk', 'platforms', 'android-34', + 'android.jar' + ) + if not os.path.exists(android_jar_path): + print('Android SDK not found at %s' % android_jar_path) + return 1 + classpath = [ args.android_source_root, - os.path.join(args.third_party, 'android_tools/sdk/platforms/android-34/android.jar'), - os.path.join(args.third_party, 'android_embedding_dependencies', 'lib', '*'), + android_jar_path, + os.path.join(args.src_dir, 'third_party', 'android_embedding_dependencies', 'lib', '*'), ] if args.build_config_path: classpath.append(args.build_config_path) diff --git a/engine/src/flutter/tools/licenses/lib/paths.dart b/engine/src/flutter/tools/licenses/lib/paths.dart index fe0e22c03d..65aa3a2200 100644 --- a/engine/src/flutter/tools/licenses/lib/paths.dart +++ b/engine/src/flutter/tools/licenses/lib/paths.dart @@ -31,6 +31,7 @@ final Set skippedPaths = { r'flutter/lib/web_ui/dev', // these are build tools; they do not end up in Engine artifacts r'flutter/prebuilts', r'flutter/sky/packages/sky_engine/LICENSE', + r'flutter/third_party/android_tools', // excluded on advice r'flutter/third_party/angle/android', r'flutter/third_party/angle/doc', r'flutter/third_party/angle/extensions',