https://github.com/mpl/go4droid
build an android app (with go bindings) in Docker
https://github.com/mpl/go4droid
android-development docker go gradle
Last synced: over 1 year ago
JSON representation
build an android app (with go bindings) in Docker
- Host: GitHub
- URL: https://github.com/mpl/go4droid
- Owner: mpl
- License: apache-2.0
- Created: 2017-05-26T21:27:38.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T13:24:56.000Z (over 7 years ago)
- Last Synced: 2025-03-18T08:11:19.708Z (over 1 year ago)
- Topics: android-development, docker, go, gradle
- Language: Dockerfile
- Size: 8.79 KB
- Stars: 35
- Watchers: 3
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go4droid
To build an android app (with go bindings) in Docker
This Dockerfile was specifically written to build `golang.org/x/mobile/example/bind/android` (with [golang.org/x/mobile/cmd/gomobile](https://godoc.org/golang.org/x/mobile/cmd/gomobile)) but it should be possible to reuse or adapt it to build other android apps with go bindings (or even without).
The docker image is hosted at [mpl7/go4droid](https://hub.docker.com/r/mpl7/go4droid/).
## usage example:
docker build -t go4droid . # or docker pull mpl7/go4droid
mkdir $HOME/.gradle # for caching
go get -d golang.org/x/mobile/example/bind/...
cd $GOPATH/src/golang.org/x/mobile/example/bind/android
docker run --rm -v "$PWD":/home/gopher/project -v $HOME/.gradle:/home/gopher/.gradle -w /home/gopher/project --name go4droid -i -t go4droid /bin/bash
gomobile bind -o app/hello.aar -target=android golang.org/x/mobile/example/bind/hello
gradle wrapper --gradle-version 4.4 # only needed once, to generate the gradle wrapper.
./gradlew assembleDebug