Update docker build to latest sdk

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Andrea Maria Piana 2018-07-10 16:17:27 +02:00
parent 44f1ca474b
commit e564de6bd0
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
4 changed files with 14 additions and 7 deletions

View File

@ -2,6 +2,7 @@ FROM openjdk:8-jdk
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV ANDROID_HOME /opt/android-sdk-linux ENV ANDROID_HOME /opt/android-sdk-linux
ENV ANDROID_SDK_HOME /opt/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}:${ANDROID_HOME}/tools ENV PATH ${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}:${ANDROID_HOME}/tools
ENV ANDROID_NDK /opt/android-ndk-linux ENV ANDROID_NDK /opt/android-ndk-linux
ENV ANDROID_NDK_HOME /opt/android-ndk-linux ENV ANDROID_NDK_HOME /opt/android-ndk-linux
@ -26,10 +27,10 @@ RUN cd /opt/android-sdk-linux && \
unzip sdk-platform-tools.zip && \ unzip sdk-platform-tools.zip && \
rm -f sdk-platform-tools.zip rm -f sdk-platform-tools.zip
RUN wget -q --output-document=android-ndk.zip https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip && \ RUN wget -q --output-document=android-ndk.zip http://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip && \
unzip android-ndk.zip && \ unzip android-ndk.zip && \
rm -f android-ndk.zip && \ rm -f android-ndk.zip && \
mv android-ndk-r15c android-ndk-linux mv android-ndk-r10e android-ndk-linux
RUN yes | sdkmanager --licenses RUN yes | sdkmanager --licenses
@ -94,6 +95,11 @@ RUN keytool -genkey -v -keystore status-im.keystore -storepass password -alias s
RUN mkdir -p /root/.gradle RUN mkdir -p /root/.gradle
RUN mv status-im.keystore /root/.gradle/ RUN mv status-im.keystore /root/.gradle/
RUN ./android/gradlew --parallel -q -b android/build.gradle assembleRelease
RUN echo "sdk.dir=/opt/android-sdk-linux" >> android/local.properties
RUN echo "ndk.dir=/opt/android-ndk-linux" >> android/local.properties
RUN cd ./android && ./gradlew react-native-android:installArchives
RUN cd ./android && ./gradlew assembleRelease
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

View File

@ -11,5 +11,6 @@ services:
- /dev/bus/usb:/dev/bus/usb - /dev/bus/usb:/dev/bus/usb
- ../src:/build/src - ../src:/build/src
- ../test:/build/test - ../test:/build/test
- ../scripts:/build/scripts
- ../android/app/src/:/build/android/app/src - ../android/app/src/:/build/android/app/src

View File

@ -14,7 +14,7 @@
:plugins [[lein-cljsbuild "1.1.7"] :plugins [[lein-cljsbuild "1.1.7"]
[lein-re-frisk "0.5.8"] [lein-re-frisk "0.5.8"]
[lein-cljfmt "0.5.7"] [lein-cljfmt "0.5.7"]
[rasom/lein-githooks "0.1.3"]] [rasom/lein-githooks "0.1.5"]]
:githooks {:auto-install true :githooks {:auto-install true
:pre-commit ["lein cljfmt check src/status_im/core.cljs $(git diff --diff-filter=d --cached --name-only src test/cljs)"]} :pre-commit ["lein cljfmt check src/status_im/core.cljs $(git diff --diff-filter=d --cached --name-only src test/cljs)"]}
:cljfmt {:indents {letsubs [[:inner 0]]}} :cljfmt {:indents {letsubs [[:inner 0]]}}

View File

@ -18,16 +18,16 @@ set -e
# For more details see: # For more details see:
# * https://developer.android.com/studio/publish/versioning # * https://developer.android.com/studio/publish/versioning
# * https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # * https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# #
getNumber () { getNumber () {
echo "$BUILD" | sed 's/[^0-9]*//g' echo "$BUILD" | sed 's/[^0-9]*//g'
} }
REGEX='^build-[0-9]\+$' REGEX='^build-[0-9]\+$'
# make sure we have all the tags # make sure we have all the tags
git fetch --tags --quiet >/dev/null git fetch --tags --quiet >/dev/null || >&2 echo "Could not fetch tags from remote"
# even if the current commit has a tag already, it is normal that the same commit # even if the current commit has a tag already, it is normal that the same commit
# is built multiple times (with different build configurations, for instance), # is built multiple times (with different build configurations, for instance),