Commit eaac9f5b authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Use go modules to build android library

This commit removes the symlinks and turns go modules back on to run
gomobile bind locally on the project.
parent c1fa4efe
Pipeline #468 passed with stage
in 13 minutes and 16 seconds
......@@ -91,10 +91,6 @@ android:
- *go-test
- export GRADLE_USER_HOME=$PWD/.gradle
# This build was setup before go.mod was a thing, go back to the old days!
# 920f6791f3ec8e7467c43ee0cefffe63200bed2b broke the gomobile build.
- export GO111MODULE=off
- go version
- go env
......@@ -105,21 +101,12 @@ android:
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'ndk-bundle' > /dev/null
- gomobile init
# Create symbolic links under $GOPATH, this is needed for local build
- export src=$GOPATH/src
- mkdir -p $src/
- mkdir -p $src/
- mkdir -p $src/$CI_PROJECT_NAMESPACE
- ln -s $CI_PROJECT_DIR $src/
- ln -s $CI_PROJECT_DIR $src/
- git -C $CI_PROJECT_DIR reset --hard
- git -C $CI_PROJECT_DIR clean -fdx
- cd $CI_PROJECT_DIR/client
# gomobile builds a shared library not a CLI executable
- sed -i 's,^package main$,package snowflakeclient,' snowflake.go client_test.go
- gomobile bind -v -target=android
- gomobile bind -v -target=android .
<<: *test-template
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment