summaryrefslogtreecommitdiff
path: root/go/android_build_shapeshifter_lib.sh
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-07-29 18:49:52 +0200
committercyBerta <cyberta@riseup.net>2019-08-02 01:49:37 +0200
commit8d0a10f8ca92de4766aee8d41f3e235590c3a848 (patch)
tree7c728357b8cd95e5de94cf7ae5a23812a99212af /go/android_build_shapeshifter_lib.sh
parent4f7455bb6ea37928bd44d8579deaa05402975bc5 (diff)
update shapeshifter lib build script using gomobile
Diffstat (limited to 'go/android_build_shapeshifter_lib.sh')
-rwxr-xr-xgo/android_build_shapeshifter_lib.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/go/android_build_shapeshifter_lib.sh b/go/android_build_shapeshifter_lib.sh
new file mode 100755
index 00000000..e3cd22d2
--- /dev/null
+++ b/go/android_build_shapeshifter_lib.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+export GOPATH=`pwd`
+export GO_LANG=`pwd`/golang/go/bin
+export GO_COMPILED=`pwd`/bin
+PATH="${GO_LANG}:${GO_COMPILED}:${PATH}"
+
+if [ -z $ANDROID_NDK_HOME ]; then
+ echo "Android NDK path not specified!"
+ echo "Please set \$ANDROID_NDK_HOME before starting this script!"
+ exit 1;
+fi
+
+./golang/go/bin/go get golang.org/x/mobile/cmd/gomobile
+
+gomobile init
+gomobile bind -target=android -o ./lib/shapeshifter.aar se.leap.bitmaskclient/shapeshifter/
+cp lib/shapeshifter* ../shapeshifter/. \ No newline at end of file