|
|
|
@ -13,21 +13,21 @@ echo "Downloading gomobile..."
|
|
|
|
|
GOPATH="$PROJECTPATH/go" go get -u golang.org/x/mobile/cmd/...
|
|
|
|
|
|
|
|
|
|
echo "Downloading gmitohtml $1..."
|
|
|
|
|
mkdir -p $GOPATH/src/gitlab.com/tslocum
|
|
|
|
|
if [ ! -d "$GOPATH/src/gitlab.com/tslocum/gmitohtml" ]; then
|
|
|
|
|
git clone https://gitlab.com/tslocum/gmitohtml $GOPATH/src/gitlab.com/tslocum/gmitohtml
|
|
|
|
|
mkdir -p $GOPATH/src/code.rocketnine.space/tslocum
|
|
|
|
|
if [ ! -d "$GOPATH/src/code.rocketnine.space/tslocum/gmitohtml" ]; then
|
|
|
|
|
git clone https://code.rocketnine.space/tslocum/gmitohtml $GOPATH/src/code.rocketnine.space/tslocum/gmitohtml
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cd $GOPATH/src/gitlab.com/tslocum/gmitohtml && git fetch origin && git reset --hard `printf %q "$1"` && cd $PROJECTPATH
|
|
|
|
|
cd $GOPATH/src/code.rocketnine.space/tslocum/gmitohtml && git fetch origin && git reset --hard `printf %q "$1"` && cd $PROJECTPATH
|
|
|
|
|
|
|
|
|
|
#echo "Downloading dependencies..."
|
|
|
|
|
#cd $GOPATH/src/gitlab.com/tslocum/gmitohtml
|
|
|
|
|
#cd $GOPATH/src/code.rocketnine.space/tslocum/gmitohtml
|
|
|
|
|
#go mod vendor
|
|
|
|
|
#cd $PROJECTPATH
|
|
|
|
|
|
|
|
|
|
echo "Binding library..."
|
|
|
|
|
mkdir -p libs
|
|
|
|
|
PATH="$PROJECTPATH/go/bin:$PATH"
|
|
|
|
|
$GOPATH/bin/gomobile bind -javapkg space.rocketnine -o libs/gmitohtml.aar -target=android -androidapi=16 $GOPATH/src/gitlab.com/tslocum/gmitohtml/pkg/gmitohtml
|
|
|
|
|
$GOPATH/bin/gomobile bind -javapkg space.rocketnine -o libs/gmitohtml.aar -target=android -androidapi=16 $GOPATH/src/code.rocketnine.space/tslocum/gmitohtml/pkg/gmitohtml
|
|
|
|
|
|
|
|
|
|
echo "Finished."
|
|
|
|
|