diff --git a/docker-build/Dockerfile b/docker-build/Dockerfile index 0da503dcf6..494ea9ff91 100644 --- a/docker-build/Dockerfile +++ b/docker-build/Dockerfile @@ -2,6 +2,7 @@ FROM openjdk:8-jdk ENV DEBIAN_FRONTEND noninteractive 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 ANDROID_NDK /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 && \ 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 && \ rm -f android-ndk.zip && \ - mv android-ndk-r15c android-ndk-linux + mv android-ndk-r10e android-ndk-linux 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 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"] diff --git a/docker-build/docker-compose.yml b/docker-build/docker-compose.yml index 9e7bc37eae..2a930caa47 100644 --- a/docker-build/docker-compose.yml +++ b/docker-build/docker-compose.yml @@ -11,5 +11,6 @@ services: - /dev/bus/usb:/dev/bus/usb - ../src:/build/src - ../test:/build/test + - ../scripts:/build/scripts - ../android/app/src/:/build/android/app/src diff --git a/project.clj b/project.clj index 4067a738b2..b506723c5f 100644 --- a/project.clj +++ b/project.clj @@ -14,7 +14,7 @@ :plugins [[lein-cljsbuild "1.1.7"] [lein-re-frisk "0.5.8"] [lein-cljfmt "0.5.7"] - [rasom/lein-githooks "0.1.3"]] + [rasom/lein-githooks "0.1.5"]] :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)"]} :cljfmt {:indents {letsubs [[:inner 0]]}} diff --git a/scripts/build_no.sh b/scripts/build_no.sh index b5ee52b811..f5e7cbcb8a 100755 --- a/scripts/build_no.sh +++ b/scripts/build_no.sh @@ -18,16 +18,16 @@ set -e # For more details see: # * https://developer.android.com/studio/publish/versioning # * https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# +# getNumber () { echo "$BUILD" | sed 's/[^0-9]*//g' } -REGEX='^build-[0-9]\+$' +REGEX='^build-[0-9]\+$' # 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 # is built multiple times (with different build configurations, for instance),