@@ -25,6 +25,10 @@ ENV CMAKE_BIN_PATH=${ANDROID_HOME}/cmake/$CMAKE_VERSION/bin
2525
2626ENV PATH=${CMAKE_BIN_PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/emulator:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${PATH}
2727
28+ # Set the encoding to resolve a known character encoding issue with decompressing tar.gz files in containers
29+ # via Gradle: https://github.com/gradle/gradle/issues/23391#issuecomment-1878979127
30+ ENV LC_ALL=C.UTF8
31+
2832# Install system dependencies
2933RUN apt update -qq && apt install -qq -y --no-install-recommends \
3034 apt-transport-https \
@@ -83,5 +87,18 @@ RUN curl -sS https://dl.google.com/android/repository/${SDK_VERSION} -o /tmp/sdk
8387 && rm -rf ${ANDROID_HOME}/.android \
8488 && chmod 777 -R /opt/android
8589
90+ # Pre-download React Native native C++ dependencies so Gradle skips downloading them at build time
91+ RUN mkdir -p /opt/react-native-downloads \
92+ && curl -sL -o /opt/react-native-downloads/boost_1_83_0.tar.gz https://archives.boost.io/release/1.83.0/source/boost_1_83_0.tar.gz \
93+ && curl -sL -o /opt/react-native-downloads/double-conversion-1.1.6.tar.gz https://github.com/google/double-conversion/archive/v1.1.6.tar.gz \
94+ && curl -sL -o /opt/react-native-downloads/fast_float-8.0.0.tar.gz https://github.com/fastfloat/fast_float/archive/v8.0.0.tar.gz \
95+ && curl -sL -o /opt/react-native-downloads/fmt-11.0.2.tar.gz https://github.com/fmtlib/fmt/archive/11.0.2.tar.gz \
96+ && curl -sL -o /opt/react-native-downloads/folly-2024.11.18.00.tar.gz https://github.com/facebook/folly/archive/v2024.11.18.00.tar.gz \
97+ && curl -sL -o /opt/react-native-downloads/gflags-2.2.0.tar.gz https://github.com/gflags/gflags/archive/v2.2.0.tar.gz \
98+ && curl -sL -o /opt/react-native-downloads/glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz \
99+ && curl -sL -o /opt/react-native-downloads/nlohmann_json-3.11.2.tar.gz https://github.com/nlohmann/json/archive/v3.11.2.tar.gz
100+
101+ ENV REACT_NATIVE_DOWNLOADS_DIR=/opt/react-native-downloads
102+
86103# Disable git safe directory check as this is causing GHA to fail on GH Runners
87104RUN git config --global --add safe.directory '*'
0 commit comments