Skip to content
Snippets Groups Projects
Commit 8f3a17c1 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Fix android build doc

parent 4e04fe68
No related branches found
No related tags found
No related merge requests found
......@@ -36,5 +36,7 @@ UserInterfaceState.xcuserstate
yarn.lock
.directory
/.local
.local
.local/env.sh
.local/android
package-lock.json
#!/bin/bash
export ANDROID_NDK_VERSION=r19c
export ANDROID_SDK_VERSION=r29.0.0
export ANDROID_SDK_TOOLS_VERSION=4333796
#JAVA_HOME=/
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
export ANDROID_SDK_TOOLS_ROOT=${ANDROID_SDK_ROOT}/build-tools
export PATH=${ANDROID_SDK_TOOLS_ROOT}/tools/bin:$PATH
......@@ -66,13 +66,14 @@ rel|pre)
esac
# Check the Java version
JAVA_VERSION=`java -version 2>&1 | grep "java version" | awk '{print $3}' | tr -d \"`
JAVA_VERSION=`java -version 2>&1 | egrep "(java|openjdk) version" | awk '{print $3}' | tr -d \"`
if [[ $? -ne 0 ]]; then
echo "No Java JRE 1.8 found in machine. This is required for Android artifacts."
exit -1
fi
JAVA_MINOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}'`
if [[ ${JAVA_MINOR_VERSION} -ne 8 ]]; then
JAVA_MAJOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[1]}'`
fiJAVA_MINOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}'`
if [[ ${JAVA_MAJOR_VERSION} -ne 1 ]] || [[ ${JAVA_MINOR_VERSION} -ne 8 ]]; then
echo "Require a Java JRE in version 1.8, but found ${JAVA_VERSION}. You can override your default JAVA_HOME in 'env.sh'."
exit -1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment