From 750abcd7d8bb2e2b441fd444ae1e72b6184a2474 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Mon, 13 Nov 2023 17:45:34 +0100 Subject: [PATCH] Revert "[deps] Stop moving NDK folder inside Android SDK (#47454)" (flutter/engine#47905) Reverts * https://github.com/flutter/engine/pull/47454 and adds documentation The NDK folder shuffling in the DEPS is to simplify the build files and enable building with different NDK versions between Dart and Flutter while sharing the build files. Closes: https://github.com/flutter/flutter/issues/136666 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../flutter/tools/android_sdk/create_cipd_packages.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/engine/src/flutter/tools/android_sdk/create_cipd_packages.sh b/engine/src/flutter/tools/android_sdk/create_cipd_packages.sh index 4adcc2c96a..a4a2e8e4f9 100755 --- a/engine/src/flutter/tools/android_sdk/create_cipd_packages.sh +++ b/engine/src/flutter/tools/android_sdk/create_cipd_packages.sh @@ -115,6 +115,17 @@ for platform in "${platforms[@]}"; do done done + # Special treatment for NDK to move to expected directory. + # Instead of the ndk being in `sdk/ndk/../`, it will be + # in `ndk/`. + # This simplifies the build scripts, and enables version difference between + # the Dart and Flutter build while reusing the same build rules. + mv $upload_dir/sdk/ndk $upload_dir/ndk-bundle + ndk_sub_paths=`find $upload_dir/ndk-bundle -maxdepth 1 -type d` + ndk_sub_paths_arr=($ndk_sub_paths) + mv ${ndk_sub_paths_arr[1]} $upload_dir/ndk + rm -rf $upload_dir/ndk-bundle + # Accept all licenses to ensure they are generated and uploaded. yes "y" | $sdkmanager_path --licenses --sdk_root=$sdk_root cp -r "$sdk_root/licenses" "$upload_dir/sdk"