From fd9bf5d9edfff405c28531aa483244ca205673b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 26 Feb 2019 15:26:17 +0200 Subject: [PATCH] travis, build: switch to NDK 19b, fix gomobile builds --- .travis.yml | 10 +++++----- build/ci.go | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d61391138..2603b3efcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,7 +137,7 @@ matrix: - go run build/ci.go archive -arch mips64le -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds # This builder does the Android Maven and Azure uploads - - if: repo = ethereum/go-ethereum AND type = push + - if: repo = ethereum/go-ethereum os: linux dist: trusty addons: @@ -165,10 +165,10 @@ matrix: - export GOPATH=$HOME/go script: # Build the Android archive and upload it to Maven Central and Azure - - curl https://dl.google.com/android/repository/android-ndk-r17b-linux-x86_64.zip -o android-ndk-r17b.zip - - unzip -q android-ndk-r17b.zip && rm android-ndk-r17b.zip - - mv android-ndk-r17b $HOME - - export ANDROID_NDK=$HOME/android-ndk-r17b + - curl https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip -o android-ndk-r19b.zip + - unzip -q android-ndk-r19b.zip && rm android-ndk-r19b.zip + - mv android-ndk-r19b $HOME + - export NDK_PATH=$HOME/android-ndk-r19b - mkdir -p $GOPATH/src/github.com/ethereum - ln -s `pwd` $GOPATH/src/github.com/ethereum/go-ethereum diff --git a/build/ci.go b/build/ci.go index 4ee76ced51..2e798aec87 100644 --- a/build/ci.go +++ b/build/ci.go @@ -800,12 +800,11 @@ func doAndroidArchive(cmdline []string) { if os.Getenv("ANDROID_HOME") == "" { log.Fatal("Please ensure ANDROID_HOME points to your Android SDK") } - if os.Getenv("ANDROID_NDK") == "" { - log.Fatal("Please ensure ANDROID_NDK points to your Android NDK") + if os.Getenv("NDK_PATH") == "" { + log.Fatal("Please ensure NDK_PATH points to your Android NDK") } // Build the Android archive and Maven resources build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind")) - build.MustRun(gomobileTool("init", "--ndk", os.Getenv("ANDROID_NDK"))) build.MustRun(gomobileTool("bind", "-ldflags", "-s -w", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile")) if *local {