From a4fefa5b5e6d2cb2afc829a9334ce62e8472b46c Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Mon, 22 Mar 2021 21:58:37 -0700 Subject: [PATCH] Version NDK and gomobile manually --- Dockerfile | 16 ++++++++++++++-- README.md | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a1103f3..b407d16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,9 @@ RUN $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSIO "platform-tools" # Install NDK -RUN $ANDROID_HOME/tools/bin/sdkmanager "ndk-bundle" +ENV NDK_VER="17.2.4988734" +RUN $ANDROID_HOME/tools/bin/sdkmanager "ndk;$NDK_VER" +RUN ln -sf $ANDROID_HOME/ndk/$NDK_VER $ANDROID_HOME/ndk-bundle # Go section of this Dockerfile from Docker golang: https://github.com/docker-library/golang/blob/master/1.10/alpine3.8/Dockerfile # Adapted from alpine apk to debian apt @@ -88,5 +90,15 @@ ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" "$GOPATH/pkg" && chmod -R 777 "$GOPATH" # install gomobile -RUN go get golang.org/x/mobile/cmd/gomobile +RUN cd /workspace/go/src; \ + mkdir -p golang.org/x; \ + cd golang.org/x; \ + git clone https://github.com/golang/mobile.git; \ + cd mobile; \ + git checkout 507816974b79c76a5fe70f9580265cd57dc78bbe; + +RUN go install golang.org/x/mobile/cmd/gomobile + +#RUN go get golang.org/x/mobile/cmd/gomobile@v0.0.0-20200629153529-33b80540585f + RUN gomobile init -ndk $ANDROID_HOME/ndk-bundle/ diff --git a/README.md b/README.md index b1b90eb..da1afea 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Versions are: - 2018.07 - Go 1.10.3 - Android API 28 + - NDK 17.2.4988734 ## Install and Use