[mirror] Go on Mobile https://golang.org/x/mobile
Go to file
David Crawshaw e5193c59b3 cmd/gomobile: reorganize build logic
The goal here is to remove several inconsistencies between
-target=android and -target=ios support, along with making the flow
of the command follow the path you might expect given a certain set
of flags, and preparing for `gomobile bind` support of ios. In
particular, building non-main packages now works with both targets
and the initialization of global build state is clearer.

The reorg also is designed around an nm trick I thought of
yesterday to do better package import scanning without a slow
all-file scan. This will give better detection of x/mobile/app and
x/mobile/exp/audio/al packages. There's a TODO about it, and I'll do
it in a future CL.

Tested with:

	go test golang.org/x/mobile/cmd/gomobile
	gomobile init
	gomobile bind golang.org/x/mobile/asset
	go test golang.org/x/mobile/bind/java
	gomobile build -target=ios golang.org/x/mobile/example/basic
	gomobile build -target=ios golang.org/x/mobile/gl
	gomobile build -target=android golang.org/x/mobile/gl
	gomobile build -target=android golang.org/x/mobile/example/basic
	(Along with manual testing of basic on an android device.)

That might make a pretty good _test.go.

Change-Id: I41230008c3c15db25a11c33b9eaca4abada9f411
Reviewed-on: https://go-review.googlesource.com/12051
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-07-13 18:54:16 +00:00
app internal/mobileinit: new package for shared logic 2015-07-08 21:29:11 +00:00
asset asset: add missing copyright header, fix typo. 2015-07-01 00:10:52 +00:00
bind cmd/gomobile: reorganize build logic 2015-07-13 18:54:16 +00:00
cmd cmd/gomobile: reorganize build logic 2015-07-13 18:54:16 +00:00
event event: fix the build from a bad merge. 2015-07-03 02:19:54 +00:00
example example/network: a simple example to show AndroidManifest customization 2015-07-09 17:52:27 +00:00
exp mobile/exp/audio: use correct indefinite article prior to PCM 2015-07-13 15:00:26 +00:00
geom app: use one thread for both GL and other UI C code. 2015-06-26 07:43:17 +00:00
gl gl/glutil: move to exp/gl/glutil. 2015-07-01 11:41:50 +00:00
internal/mobileinit x/mobile/internal/mobileinit: revert Android log prefix 2015-07-11 11:50:45 +00:00
testdata example/sprite: make example lives 2014-12-22 13:10:48 +00:00
.gitattributes mobile: copying .gitattributes to all subrepositories 2014-12-23 23:23:25 +00:00
.gitignore gitignore: add apk and app to the ignore list 2015-06-30 15:15:53 +00:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTING.md doc: add CONTRIBUTING.md 2015-02-18 23:42:31 +00:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
Dockerfile Dockerfile: update go version to 3f4de49. 2015-04-20 17:34:49 +00:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README.md doc: fix whitespace between stable and exp packages 2015-06-22 00:54:25 +00:00
codereview.cfg mobile: add codereview.cfg 2015-03-18 17:03:44 +00:00

README.md

Go support for Mobile devices

The Go mobile repository holds packages and build tools for using Go on Android.

This is early work and installing the build system requires Go 1.5. Follow the build instructions on godoc.org/golang.org/x/mobile/cmd/gomobile to install the gomobile command and build the basic example.


APIs are currently very limited, but under active development. Package documentation serves as a starting point:


Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.