Skip to content

Commit 428ca23

Browse files
authored
Add a CMAKE_BIN_PATH variable to the PATH (#164)
* Add a `CMAKE_BIN_PATH` variable to the PATH * Configure `KOTLIN_HOME`
1 parent b843502 commit 428ca23

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@ ARG ANDROID_TOOLS_VERSION=31.0.0
2828
ARG NDK_VERSION=21.4.7075529
2929
ARG NODE_VERSION=14.x
3030
ARG WATCHMAN_VERSION=4.9.0
31+
ARG CMAKE_VERSION=3.18.1
3132

3233
# set default environment variables, please don't remove old env for compatibilty issue
3334
ENV ADB_INSTALL_TIMEOUT=10
3435
ENV ANDROID_HOME=/opt/android
3536
ENV ANDROID_SDK_ROOT=${ANDROID_HOME}
3637
ENV ANDROID_NDK=${ANDROID_HOME}/ndk/$NDK_VERSION
3738
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
39+
ENV CMAKE_BIN_PATH=${ANDROID_HOME}/cmake/$CMAKE_VERSION/bin
3840

39-
ENV PATH=${ANDROID_NDK}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/emulator:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:/opt/buck/bin/:${PATH}
41+
ENV PATH=${ANDROID_NDK}:${CMAKE_BIN_PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/emulator:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:/opt/buck/bin/:${PATH}
4042

4143
COPY --from=buck /tmp/buck.pex /usr/local/bin/buck
4244

@@ -109,7 +111,7 @@ RUN curl -sS https://dl.google.com/android/repository/${SDK_VERSION} -o /tmp/sdk
109111
"emulator" \
110112
"platforms;android-$ANDROID_BUILD_VERSION" \
111113
"build-tools;$ANDROID_TOOLS_VERSION" \
112-
"cmake;3.18.1" \
114+
"cmake;$CMAKE_VERSION" \
113115
"system-images;android-21;google_apis;armeabi-v7a" \
114116
"ndk;$NDK_VERSION" \
115117
&& rm -rf ${ANDROID_HOME}/.android \

scripts/test-react-native-setup.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
set -e
44

5-
echo "Check Buck setup"
5+
export KOTLIN_HOME="third-party/kotlin"
6+
7+
echo "Download Buck dependencies"
68
./scripts/circleci/buck_fetch.sh
9+
10+
echo "Build React Native via Buck"
711
buck build ReactAndroid/src/main/java/com/facebook/react
812
buck build ReactAndroid/src/main/java/com/facebook/react/shell
913

10-
echo "Build React Native"
14+
echo "Build React Native via Gradle"
1115
yarn install
1216
./gradlew --no-daemon :ReactAndroid:packageReactNdkLibsForBuck
1317

0 commit comments

Comments
 (0)