Skip to content

Commit

Permalink
Clarify the use of a fake NDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
hevrard committed Jun 16, 2020
1 parent 23f5d44 commit ab68cff
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions kokoro/presubmit/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ curl -L -k -s https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y clang-format-6.0

# Mock the correct NDK version.
# Our Bazel scripts check that the correct NDK version is installed: rather
# than downloading the 1+GB NDK just to have a matching version to pass this
# presubmit test, we "mock" the version by overwriting it manually.
export ANDROID_NDK_HOME=/opt/android-ndk-r16b
cat > $ANDROID_NDK_HOME/source.properties <<EOF
# Fake NDK with the expected version.
# Our Bazel scripts check that a specific NDK version is installed: rather
# than downloading the 1GB+ NDK just to have a matching version, we manually
# create a fake NDK with only a version file.
export ANDROID_NDK_HOME=android-ndk-fake
mkdir -p ${ANDROID_NDK_HOME}
cat > ${ANDROID_NDK_HOME}/source.properties <<EOF
Pkg.Desc = Android NDK
Pkg.Revision = 21.0.6113669
EOF

cat ${ANDROID_NDK_HOME}/source.properties

# Setup environment.
export BAZEL=$BUILD_ROOT/bazel/bin/bazel
export BUILDIFIER=$BUILD_ROOT/tools/bin/buildifier
Expand Down

0 comments on commit ab68cff

Please sign in to comment.