aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-01-20 17:33:58 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-01-20 17:33:58 +0800
commit7814a8e1315b1746d5260562de4c0b6f161a1cc9 (patch)
tree0c4c40b05c4800e1bce51b761ff123245e6557fd /build
parentebc3d232f4b6c197d5dc5da2e1868d56b2096f1a (diff)
downloaddexon-7814a8e1315b1746d5260562de4c0b6f161a1cc9.tar
dexon-7814a8e1315b1746d5260562de4c0b6f161a1cc9.tar.gz
dexon-7814a8e1315b1746d5260562de4c0b6f161a1cc9.tar.bz2
dexon-7814a8e1315b1746d5260562de4c0b6f161a1cc9.tar.lz
dexon-7814a8e1315b1746d5260562de4c0b6f161a1cc9.tar.xz
dexon-7814a8e1315b1746d5260562de4c0b6f161a1cc9.tar.zst
dexon-7814a8e1315b1746d5260562de4c0b6f161a1cc9.zip
travis: Install Android NDK explicitly, removed from gomobile (#3593)
The Android NDK was recently removed from gomobile, leading to our Android builds failing. Starting from https://go-review.googlesource.com/#/c/35173/ , gomobile requires a locally installed NDK. This PR ensures that travis installs that too before running the build steps.
Diffstat (limited to 'build')
-rw-r--r--build/ci.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/build/ci.go b/build/ci.go
index a3213e7c9..319691e8a 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -700,9 +700,16 @@ func doAndroidArchive(cmdline []string) {
flag.CommandLine.Parse(cmdline)
env := build.Env()
+ // Sanity check that the SDK and NDK are installed and set
+ 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")
+ }
// Build the Android archive and Maven resources
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile"))
- build.MustRun(gomobileTool("init"))
+ build.MustRun(gomobileTool("init", "--ndk", os.Getenv("ANDROID_NDK")))
build.MustRun(gomobileTool("bind", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile"))
if *local {