Commit Graph

946 Commits

Author SHA1 Message Date
Elias Naur 1f177cbe4d bind: ignore unsupported basic types
Before this change, binding unsupported basic types such as
uint failed with an error. Instead, add them to the list of
ignored types so that no error is generated and a comment is
generated explaining why the offending function, constant or
variable was skipped.

Unsigned integers are probably easy to support in ObjC, but
leave them unsupported for now.

While here, improve the printing of the ignored types in the
explaining comments.

Fixes golang/go#24762

Change-Id: I0d9ab471b2245728270f6ee588f554d4a105d500
Reviewed-on: https://go-review.googlesource.com/105377
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
2018-04-10 16:30:43 +00:00
Elias Naur 90139f6bae cmd/gomobile: don't run gobind with the ios tag
Bindings are independent of any particular GOOS/GOARCH pair and
as such the gomobile bind command doesn't set GOOS nor GOARCH when
running gobind. However, the ios tag was still added to the list
of tags to pass to gobind for -target=ios.

Move the ios tag to when actually building the bound packages,
mirroring gomobile build.

Add TestBindIOS and update TestBindAndroid.

Updates golang/go#24644

Change-Id: I007829c26036427a3376bba11a1ccb86e7338848
Reviewed-on: https://go-review.googlesource.com/104458
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-04-05 18:31:59 +00:00
Elias Naur 29776d85b2 app: support importing the package for bind programs
Delay loading of the getRune method ID to the first GoNativeActivity
is created. That way, importing golang.org/x/mobile/app will not
crash, even for gomobile bind programs that don't include (or use)
GoNativeActivity.

Fixes golang/go#24490

Change-Id: I4bf90e067700451f7c026e53165b6614366d7a94
Reviewed-on: https://go-review.googlesource.com/104395
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-04-05 18:30:20 +00:00
Elias Naur 3a7f1138ab app,exp/gl/glutil: add missing build directives
For some reason, the changes to the build tags that was supposed to
go in with CL 102915 didn't make it.

Fixes golang/go#24644

Change-Id: I106b3c71fef1088dd1eea193323c13d81e5985fa
Reviewed-on: https://go-review.googlesource.com/104355
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-04-03 15:03:16 +00:00
Elias Naur 19987bc3dc cmd/gomobile: fix tests
Forgot to update tests on macOS after CL 102915.

Change-Id: I902fd1046434d133129a0cd82bc28c3f7ee47816
Reviewed-on: https://go-review.googlesource.com/104455
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-04-03 15:02:56 +00:00
Elias Naur 54bca60619 app,cmd/gomobile,exp/gl/glutil: support target architectures for iOS build and bind
While we're here, add 386 to the list of supported architectures
on iOS.

To support gomobile build for amd64 and 386, use the "ios" tag to
distinguish between iOS and macOS builds.

Change-Id: Ie09a432794bd8d9853950115349f8d3b57cf43f5
Reviewed-on: https://go-review.googlesource.com/102915
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-28 15:26:55 +00:00
Elias Naur 4e3d9b7944 cmd/gomobile: add missing checks for the NDK and Xcode
Fixes golang/go#24571

Change-Id: I8d08548b4a4d6f9490a8bfd80c80a6408fde089b
Reviewed-on: https://go-review.googlesource.com/102896
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-28 14:47:19 +00:00
Hajime Hoshi ae1772d3eb x/mobile/cmd/gomobile: allow digits-only basename for Android package name
Now package names for Android is generated based on the given package
path's base name, And the package name generation fails when the base
name consists of only digits (e.g. github.com/hajimehoshi/ebiten/examples/2048).

This CL fixes this problem by allowing only-number base name.

Fixes #24511

Change-Id: I6108c46823d0b2ee08869b306922f62351fb1510
Reviewed-on: https://go-review.googlesource.com/102576
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-27 03:16:25 +00:00
Elias Naur 2a86fdcad0 cmd/gomobile: don't ignore -openal if no NDK was found
Updates golang/go#20902

Change-Id: I523c0b7a205e620c143f2ba9c7cdbe30865a9c59
Reviewed-on: https://go-review.googlesource.com/101136
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-26 17:12:34 +00:00
Elias Naur 5d852261b1 cmd/gobind,cmd/gomobile: support the default GOPATH
Instead of using os.Getenv("GOPATH"), use go env GOPATH to determine
the effective GOPATH.

Fixes golang/go#21658

Change-Id: I03f897969e30fc3256d171aa7b32c101a9342a1a
Reviewed-on: https://go-review.googlesource.com/101117
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-26 17:12:27 +00:00
Elias Naur b07e525bd7 cmd/gomobile: make sure gobind is installed and updated
When running gomobile bind, make sure gobind exists. If not, instruct
the user to run gomobile init which will go install gobind.

Change-Id: I2d064ba58874fd5581c17417124561f3d1fb6b83
Reviewed-on: https://go-review.googlesource.com/101055
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-26 17:12:18 +00:00
Elias Naur 6b7c05d452 cmd/gomobile: use standalone NDK toolchains
Issue golang/go#24058 demonstrates a Go package that fails to build with
gomobile but builds successfully with a manually using the standalone NDK
toolchain. I haven't been able to figure out a set of CPPFLAGS/LDFLAGS
that fixes the build for 24058 so instead rework gomobile to use
standalone NDK toolchains.

Standalone toolchains fixes the 24058 build and is the official way
to build Android programs. So gomobile should be less affected by
future changes in the NDK toolchain internals.

Create the standalone toolchains with gomobile init.

With the new Go 1.10 build cache, the prebuild work by the gomobile
init command is useless. Use the opportunity to simplify init to
only creating NDK toolchains and, optionally, building OpenAL for
Android. With that, it is no longer necessary to use gomobile init
to build iOS apps and frameworks.

Fixes golang/go#24058

Change-Id: I4692fcaa927e7076a6387d080ebc1726905afd72
Reviewed-on: https://go-review.googlesource.com/99875
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-26 17:11:49 +00:00
pankona 598bfe4b20 cmd/gomobile: support vendored "golang.org/x/mobile/..." packages
gomobile checks "golang.org/x/mobile/..." packages are included in
the build product using nm.
If "golang/x/mobile/..." package is placed under vendor directory,
this check fails and it is treated as a build failure.

Fixes golang/go#22152

Change-Id: Ie0e05c3e0340b3608de5c68bb3f852d4ef7cdeb1
Reviewed-on: https://go-review.googlesource.com/102095
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-03-23 11:57:23 +00:00
Elias Naur 57eb1e2f00 bind/benchmark: move package to testdata
Move the benchmark support package to the testdata directory, just
like the other test packages.

Change-Id: Idc35ca973a7da78e8c8bb640ba60cfb947fbed5b
Reviewed-on: https://go-review.googlesource.com/101896
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-21 18:16:30 +00:00
Elias Naur 8ee74ac900 bind: support underscores in identifiers
Fixes golang/go#18536

Change-Id: I82c5993547e4d1d0df14726ccc569e1f57128072
Reviewed-on: https://go-review.googlesource.com/101156
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-21 16:27:11 +00:00
Elias Naur 671e1c1ae2 bind: avoid header guard clashes for uppercase Go packages
Fixes golang/go#21552

Change-Id: Id01434271916ddc489eb5f7d8355d9519885eaf4
Reviewed-on: https://go-review.googlesource.com/101116
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-21 16:25:10 +00:00
Elias Naur 70293e6c50 bind: skip incompatible constructors in ObjC bindings
Fixes golang/go#21523

Change-Id: I1244e296ac4eeb0d10847e73216e4a25a3533292
Reviewed-on: https://go-review.googlesource.com/101115
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-21 16:22:27 +00:00
Elias Naur c922c29296 bind: add nil and bool to ObjC keyword list
While we're here, sort the keyword list.

Fixes golang/go#22875

Change-Id: I31844c3d66f959bb0dc47eb3062e41f75d7b765e
Reviewed-on: https://go-review.googlesource.com/100795
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-21 13:43:35 +00:00
Elias Naur b392a2d072 bind: handle import paths without trailing slashes correctly
If ever the gobind tool switches to a source importer (see CL
99777), make sure import paths are without trailing slashes are
handled correctly.

Change-Id: Ib3ce15f8dcd53dce09a5bb183e4013a5deba39b4
Reviewed-on: https://go-review.googlesource.com/99776
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-21 12:14:32 +00:00
Elias Naur 2f2872eacd example/reverse: delete
The reverse bindings allow access to Java and ObjC APIs by importing
Java/... and Objc/... package from Go. The gobind tool automatically
create the bindings for the API referenced from the packages.

The reverse example takes that ability too far, however. It creates
a circular dependency from the Android databinding layout files to
exported Go types while those same Go types access the Java classes
generated by databinding. It works almost by accident, but not for
newer Gradle versions.

The circular dependencies are bad, but the underlying circular references
created by using the reverse bindings this way are worse. I haven't found
a satisfactory was to avoid retaining references to Go objects from Java
and back without carefully and manually breaking cycles at appropriate
times. One might succeed in ObjC where breaking reference cycles are
already necessary, but not in Java.

The reverse example is a nice technical feat, but promises more than
it can deliver. Delete it.

Fixes golang/go#19862
Fixes golang/go#18210

Change-Id: Ie6abd2a0ebd4c4ce36339d1294898e15f22f83bd
Reviewed-on: https://go-review.googlesource.com/101155
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-16 14:27:06 +00:00
Elias Naur 37c5126484 misc/androidstudio/src/main/groovy/org/golang/mobile: update gobind path
Gobind now outputs Java sources to the java/ subdirectory. Update the
gradle plugin to match. Only projects using reverse bindings are
affected.

Change-Id: Id7f893d3c67a9ab63336c4e031c9196a0b6dad2c
Reviewed-on: https://go-review.googlesource.com/99775
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-16 06:59:25 +00:00
Elias Naur 4600df55ca bind, cmd: generate complete standalone bindings from gobind
The gobind and gomobile bind tools have historically overlapped:
gobind outputs generated bindings, and gomobile bind will generate
bindings before building them. However, the gobind bindings were
never used for building and thus allowed to not be complete.

To simplify version control, debugging, instrumentation and build
system flexibility, this CL upgrades the gobind tool to be the
canonical binding generator and change gomobile bind to use gobind
instead of its own generator code.

This greatly simplifies gomobile bind, but also paves the way to skip
gomobile bind entirely. For example:

$ gobind -outdir=$GOPATH golang.org/x/mobile/example/bind/hello
$ GOOS=android GOARCH=arm64 CC=<ndk-toolchain>/bin/clang go build -buildmode=c-shared -o libgobind.so gobind
$ ls libgobind.*
libgobind.h  libgobind.so

The same applies to iOS, although the go build command line is more
involved.

By skipping gomobile it is possible to freely customize the Android
or iOS SDK level or any other flags not supported by gomobile bind.
By checking in the generated source code, the cost of supporting
gomobile in a custom build system is also decreased.

Change-Id: I59c14a77d625ac1377c23b3213672e0d83a48c85
Reviewed-on: https://go-review.googlesource.com/99316
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-16 06:47:34 +00:00
Elias Naur f16143114e bind, cmd/gobind/test: remove GOOS build tags from test packages
The gobind command is about to get more powerful and able to generate
complete and standalone bindings. Platform specific build tags based
on GOOS or GOARCH are now meaningless to generate bindings from, so
remove them from the test packages.

The tags mattered to the reverse bound packages, since the go tool can't
build them without the Go wrappers for the imported Java packages.
Before this CL, the `android` tag was used to fool the go tool since
the host GOOS is unlikely to be android.

A fix is to check in the generated Go wrappers, but since the
packages are for testing we don't want that. Instead, move the test
packages to the testdata directory so the go tool ignores them.

Change-Id: I57178e930a400f690ebd7a65758bed894eeb10b0
Reviewed-on: https://go-review.googlesource.com/99315
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 22:25:02 +00:00
Andrew Bonventre f9a23313dd CONTRIBUTING.md: remove note about not accepting Pull Requests
Updates golang/go#24185

Change-Id: I1ce066be52feff5d2372633776aa631e0ce7e713
Reviewed-on: https://go-review.googlesource.com/100684
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-14 18:02:45 +00:00
Elias Naur b7e3346cb3 cmd/gomobile: update gomobile bind -help text
The default ObjC prefix and Java package have been the empty string
for a while, but the gomobile bind -help text wasn't updated.

Change-Id: I8acb265ae7385121fae4c2cc314220d97575d20c
Reviewed-on: https://go-review.googlesource.com/99317
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 14:08:55 +00:00
Elias Naur bcd28df570 all: fix non-standard "DO NOT EDIT" comments for generated files
In the spirit of CL 99955, fix all non-standard generated code
headers and re-run the generators. Some generated files needed
git gofmt afterwards, but that problem is left for now.

Change-Id: I6b3131fb1753dc427d05af03107031120755cab0
Reviewed-on: https://go-review.googlesource.com/99975
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 14:08:28 +00:00
Elias Naur eac33190a3 cmd/gomobile: don't dump certificate to test log
The output takes up many lines and obscures other test output from
go test -v.

Change-Id: I0896717db3ce287f9e4b4263451475c19758b0e3
Reviewed-on: https://go-review.googlesource.com/99778
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-14 14:07:50 +00:00
Elias Naur 70bad68322 cmd/gomobile: remove redundant build
The extra build can't be required, because it is not run for the
build of the first GOARCH later in the loop. Tests run fine
without it.

Change-Id: Ida27e31ace2417192cce06c2efc93fa0d357012e
Reviewed-on: https://go-review.googlesource.com/98975
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-07 14:01:21 +00:00
Elias Naur 8a8a989f48 cmd/gomobile: run go install in c-shared mode only if NDK is set
A check for the NDK was missing from the pre-install of the standard
library for each Android GOARCH. If the NDK wasn't set, the go install
invocation would silently use the host GOARCH and GOOS and only fail if
no host gcc was found for runtime/cgo.

Discovered while setting up gomobile on a clean Windows machine.

With the go 1.10 cache go installing the standard library might be
pointless, but let's wait a little before removing it.

Change-Id: I880eed32aad23fda10ae92bd35be2ce9b03ddb86
Reviewed-on: https://go-review.googlesource.com/96636
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-23 15:52:32 +00:00
Elias Naur cdc07529f8 internal/binres: skip resources tests if android.jar of api 15 is missing
Change-Id: I1cf92bb03c420e1eddaa36824cf488c5ed6f5a78
Reviewed-on: https://go-review.googlesource.com/93998
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-21 20:21:33 +00:00
Elias Naur 4113bce085 bind/java: remove android support library dependency in test
Remove the android support library dependency.

The Android build system assumes at least one resource, so
add a dummy string.

Change-Id: I7223b75709f1aa5907e6d04bc656eea5503bb640
Reviewed-on: https://go-review.googlesource.com/94195
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-21 20:07:02 +00:00
Elias Naur 23253814e8 app: skip failing TestAndroidApp test
Updates golang/go#23835

Change-Id: If4aea8fde3b6b66980573d94f0d2189396f6a50c
Reviewed-on: https://go-review.googlesource.com/93997
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-21 20:06:47 +00:00
Hana Kim 78f32148b9 misc/androidstudio: update plugin version to 0.2.11
https://plugins.gradle.org/plugin/org.golang.mobile.bind/0.2.11

Built/published with

$ docker run --rm -u root -v "$PWD":/home/gradle/project \
     -w /home/gradle/project gradle:latest gradle publishPlugins

Gradle version 4.5.1

Change-Id: I431101a2b9000147430632ec24e76e8216c66935
Reviewed-on: https://go-review.googlesource.com/95455
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-02-20 15:45:06 +00:00
Vignesh Ramachandra f52077efd0 misc/androidstudio: ensure gomobile bind completes before java compilation
When there is no prior gradle cache (i.e .gradle/ directory isn't created yet) in your Android project and a gradle build command is executed (e.g ./gradlew build), the *.so files generated by the gobind android plugin is not packaged into the apk.
Successive builds work fine though.

This issue doesn't happen when using Android plugin version 2.x, but does using version 3.x.

The gomobile bind task, libTask, is only finalizing the java compile task which allows it to run in parallel with javaCompile. That is probably too late, so instead, make libTask a dependency of the compile task to make sure the output of gomobile bind (in particular, the *so libraries) are included in the final build product.

Fixes golang/go#23766

Change-Id: I62727bfa0ffd54d8158c3a2aa3d7303867fcbabc
Reviewed-on: https://go-review.googlesource.com/94835
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-02-20 15:10:30 +00:00
Elias Naur 4bfed40def all: fix vet errors from Go 1.10
Change-Id: I624bbbb5aeda923aa48c37af9447bc4903b0de3f
Reviewed-on: https://go-review.googlesource.com/93996
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-02-14 22:03:29 +00:00
Elias Naur 5704e182c7 bind: avoid header include cycles in generated ObjC code
The test in CL 87656 exposed the problem that an ObjC class C in
header C.h can't implement an interface I in I.h if I.h itself includes
C.h, resulting in an include cycle. Avoid the problem for now by
restricting the set of declared interfaces to the current package and
its imports. This is too strict, but simple and avoids any include
cycles.

Fixes the bind/objc SeqTest on iOS.

Change-Id: I2ff964593cb9e56994c42b68cc49eebe2f549217
Reviewed-on: https://go-review.googlesource.com/88818
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-01-22 17:02:51 +00:00
Ryuji Iwata 125c5259d9 cmd/gomobile: improve Xcode check
Since the xcrun binary exists in macOS from the beginning, it can not be used to check that Xcode is available.

The xcodebuild command does not return an error if Xcode is available.

Reference https://go-review.googlesource.com/c/mobile/+/35852

Change-Id: Ibb6324a2d801eab47b3544c50ee1cdbc36b608bc
Reviewed-on: https://go-review.googlesource.com/88755
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-20 19:27:59 +00:00
Egon Elbre 64951f83ad gl: fix typos in multiple places
Windows bindings had few invalid bindings.
Debug type had a typo, making gldebug non-compilable.
Use consistently .c() for types.

Fixes golang/go#23451

Change-Id: Ic9e68b1aafcd732dd5e4d8f883324723a35d24c3
Reviewed-on: https://go-review.googlesource.com/87855
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-17 09:46:58 +00:00
Elias Naur 0879aa9afa bind: support types with the same title name as their packages
If a Go struct or interface has the same name as its package class,
append an underscore to the generated Java class name.

Fixes golang/go#23327.

Change-Id: Ib680af35c956801073a0effb510a3ed9bbb8b9d1
Reviewed-on: https://go-review.googlesource.com/87656
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-01-17 09:45:22 +00:00
Thomas Meson 02851653b1 cmd/gobind: make it generate everything like gomobile bind
the promise of the doc is to be able, once run twice with objc/java and go, to
import the generated code into a package and build a c-archive for iOS and
a c-shared for Android. As of today, this promise is not kept. Imports were not
properly made, files were missing. Also, make it generates the output `gomobile
bind` does.

Change-Id: Ic28087fe1b1661d54f41c446233580856e3a1211
Reviewed-on: https://go-review.googlesource.com/87715
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-15 13:32:49 +00:00
Thomas Meson ace2f0b992 cmd/gobind: fix missing parameter for formatting
Change-Id: I89256a18a9aeb2f32808f391258c8f66690e5247
Reviewed-on: https://go-review.googlesource.com/87716
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-15 13:14:41 +00:00
Hana Kim 069be623eb example: update android examples to use 0.2.10 plugin
Also, modernize the build.gradle configurations
to work with recent Android plugin (>=3.0.0)

https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html

Update golang/go#21594

Change-Id: Ic2162db7367b60ad873149ab62767f36481fa80f
Reviewed-on: https://go-review.googlesource.com/86795
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-09 15:14:44 +00:00
Hana Kim 54bd6957e8 misc/androidstudio: update to 0.2.10
0.2.9 was broken - for unknown reasons, the plugin was built on
top of stale sources.

Updates golang/go#21594

Plugin 0.2.10 was built with rev 50b7067 and this change.
  % docker run --rm -u root -v "$PWD":/home/gradle/project \
    -w /home/gradle/project gradle:latest \
    gradle publishPlugins

Gradle version is 4.0.1.

Change-Id: I146dc67cbad3c9945a2acdf4ac7993283725090a
Reviewed-on: https://go-review.googlesource.com/86775
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-01-09 15:14:31 +00:00
Tad Fisher 50b7067763 bind/java: fix build on NDK r16
Import <string.h> to provide a memcpy declaration.

Fixes golang/go#22766

Change-Id: I0762a1bb9d8d30bb1ae6f1a98648795ea57b0913
Reviewed-on: https://go-review.googlesource.com/79499
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-17 15:46:28 +00:00
Sergiusz Bazanski b28c5379a5 gl: add OpenBSD support
This is the same as https://go-review.googlesource.com/c/exp/+/79917, but applied to the mobile project.

Change-Id: I77c7455317aaf09da8fbeaf943c14a2dab9da735
Reviewed-on: https://go-review.googlesource.com/79896
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-26 19:47:19 +00:00
Kevin Ruffin 37cf9e7ab8 cmd/gomobile: rename bundleId to bundleID
Renames the argument to the -bundleid command line flag to be
consistent with other parameter naming.

Change-Id: Icde0be0fbacb08712c415abce462070a84aa46d9
Reviewed-on: https://go-review.googlesource.com/79115
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-21 18:45:43 +00:00
Kevin Ruffin c0beac360c cmd/gomobile: add the -bundleid flag
The current gomobile build command fails when attempting to sign the application
indicating that a development team should be selected. These changes fix that
by auto-detecting the developer team ID and setting the
"allowProvisioningUpdates" flag on the xcodebuild command. The bundle ID of
the application is also allowed to be changed via another command line
parameter "bundleid".

Fixes golang/go#17407

Change-Id: Ib0b878424a95a0cd49f3655ed4de56b2b91ff7a0
Reviewed-on: https://go-review.googlesource.com/77070
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-11-18 10:20:10 +00:00
Kyohei Kadota 2a5bbaa217 cmd/gobind: fix a typo that is missing quote at end
Change-Id: I91ffbda9c8f562bc66b75ca8a6360196d41c1b28
Reviewed-on: https://go-review.googlesource.com/74610
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2017-10-31 14:28:16 +00:00
Elias Naur 2f6753be0d example/bind/ios/bind.xcodeproj: disable bitcode in Xcode settings
Go compiles to machine code, not bitcode and Xcode will complain if
the bitcode setting is left enabled (the default).

Change-Id: If2caca0b70419c2901b5bfc159669307be39f964
Reviewed-on: https://go-review.googlesource.com/72670
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-23 18:25:25 +00:00
Daniel Skinner eed0461ac2 cmd/gomobile: icon support for android
Provides support for resources.arsc generation enabling
the setting of an application icon.

If an asset/icon.png is encountered during build, then
the resources.arsc is generated to identify a single
xxxhdpi resource and the manifest will be updated to
reference resource as app icon.

References golang/go#9985

Change-Id: I9ef59fff45dcd612a41c479b2c679d22c094ab36
Reviewed-on: https://go-review.googlesource.com/30019
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-10-17 01:04:57 +00:00