290 Commits
Author SHA1 Message Date
Ashley Mensah e2c477538f The .support files were missed when updating the module path from golang.org/x/mobile to github.com/netbirdio/gomobile-tvos-fork in commit a682d4b. This caused a module path conflict error when gobind-netbird tried to resolve the bind packages. 2026-01-29 18:26:54 +01:00
Ashley Mensah a682d4b4eb Update module path and rename binaries to netbird-specific names
- Changed module path from golang.org/x/mobile to github.com/netbirdio/gomobile-tvos-fork
- Renamed gomobile → gomobile-netbird
- Renamed gobind → gobind-netbird
- Updated all internal imports
- Updated README.md with new installation and usage instructions
2026-01-15 11:17:24 +01:00
cuishuangandGopher Robot 188f512ec8 all: fix some comments
Change-Id: Idd6568edd3910379c0d558fd79679dbdb589fab1
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/713082
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-10-21 08:11:56 -07:00
Iliya LyanandGopher Robot a1d90793fc all: replace deprecated io/ioutil package
Change-Id: Ie22fc00b1382fbf854ce5c2cd617bc9cb1e0c674
GitHub-Last-Rev: 3176a9fecffd48bad69493a188116a4f0961640d
GitHub-Pull-Request: golang/mobile#110
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/674035
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Auto-Submit: Hajime Hoshi <hajimehoshi@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-05-20 11:05:27 -07:00
Dmitri ShuralyovandGopher Robot cd096645fc all: delete obsolete import comments
Import comments were initially used to specify the canonical import path
of a package, to prevent it from being used with a non-canonical path by
accident. The module path in the go.mod file serves that purpose now.

Change-Id: I36ebca191eb996b7254a6d452aa4f8dba88a6f94
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649383
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
2025-02-18 09:38:27 -08:00
Dmitri ShuralyovandGopher Robot a8bae73673 all: make copyright headers consistent
The standard copyright header at https://go.dev/doc/contribute#copyright
has a single space (also see CL 20022). Also, add it to a files where it
was missed.

Change-Id: I341ce5b5c455efa768b65597c387866e47a6757e
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649382
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-02-18 09:38:25 -08:00
Dmitri ShuralyovandGopher Robot 7c4916698c all: fix printf(var) mistakes detected by latest printf checker
There's some similarity here to the situation in CL 610676. The calls
that now look like g.Printf("%s", something) would perhaps be better
expressed like g.Print(something) or g.WriteString(something), but
that's a bigger potential change to consider. This is a minimal fix.

For golang/go#69267.

Change-Id: I9cf23aef7bf2b9d9c7e9dcf3b48ecb23231016dd
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/610800
Reviewed-by: Tim King <taking@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2024-09-05 00:41:12 +00:00
vitalmotifandGopher Robot c76e57eead all: remove the repetitive words
Change-Id: Ifdadb14d311a3620e499f0b33feefa3e0448a6f1
GitHub-Last-Rev: 4c346f55374cb8ab87c7a258c7d4ed932faa25ad
GitHub-Pull-Request: golang/mobile#97
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/573035
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
2024-03-20 16:22:01 +00:00
Hajime HoshiandGopher Robot fbe1c053b6 all: update Go version to 1.18
Fixes golang/go#62415

Change-Id: Ica46a62f60b8ebcf6244da98fe4e0643206cb24f
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/525095
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2023-09-05 14:05:55 +00:00
cui fliterandGopher Robot 43a0384520 all: remove redundant type conversion
Change-Id: If63bcb8fd7610d0a052be5771062cbf4efc41355
GitHub-Last-Rev: 1739535c96132893f72cb5c40d76a11a8bbc6a94
GitHub-Pull-Request: golang/mobile#83
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/429057
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-11-10 04:32:01 +00:00
Ben SchwartzandHyang-Ah Hana Kim 8578da9835 all: modernize handling of Android SDK and NDK paths
This change removes Gomobile's dependency on ANDROID_HOME and
ANDROID_NDK_HOME.  Setting ANDROID_HOME is generally optional,
and ANDROID_NDK_HOME is deprecated.

This change also increases the minimum API version to 16, as
all SDKs that supported API 15 are now deprecated.

Fixes golang/go#52470

Change-Id: I546365774a089e5d7ae1be0a538efd72741d92ac
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/401574
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Daniel Skinner <daniel@dasa.cc>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-05-18 20:53:45 +00:00
Hilário CoelhoandHyang-Ah Hana Kim eae5320c54 bind: added protocol documentation to Objective-C generated file
Fixes golang/go#46956

Change-Id: Ifa1b8e7f2a0e46034f0eccc32249f69a064199e3
GitHub-Last-Rev: 175fa08b1696fca4c11b35b691e0df550ed66864
GitHub-Pull-Request: golang/mobile#67
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/331429
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-18 03:50:03 +00:00
Russ CoxandGopher Robot ce6a79cf6a all: gofmt
Gofmt to update doc comments to the new formatting.

For golang/go#51082.

Change-Id: I9b4c287e2d25aa108adfa9fe2f972c8fd3d68fe1
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/399597
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
2022-04-14 15:34:00 +00:00
cuishuangandHyang-Ah Hana Kim 55113b94f0 mobile: fix some typos
Change-Id: Iaffde6f90b92b1f8b96c76d2bc3d8c312ebb764f
GitHub-Last-Rev: 7413e9537adc1626c76386cf2d47188eeed8342e
GitHub-Pull-Request: golang/mobile#76
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/390014
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-03-07 22:04:22 +00:00
Hana 858099ff78 cmd,bind: add implicit dependencies
cmd/gomobile depends on cmd/gobind. Code generated by cmd/gobind
depends on packages under golang.org/x/mobile/bind. Explicitly
list those (with build tags) so the go command can take into account
these implicit dependencies (e.g. go mod tidy or go mod vendor).

We use tag `mobile_implicit`.

Updates golang/go#43736

Change-Id: I09c519556ffe8e8c4db0754571c5173b1613c210
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/377754
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-01-12 01:59:53 +00:00
Hajime Hoshi 4a8be17bd2 all: add go:build comments for .m and .c files
Change-Id: I24fbde8ec50be43000b9fcf3e7801f1ad25238cb
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/374498
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-01-04 18:42:38 +00:00
Changkun OuandHajime Hoshi 18b1a0c48f cmd/gomobile: use Apple Development over iPhone Developer
Apple Development Program was introduced in WWDC2015. It is 2021 today,
and there should have no possibility to use iPhone Developer certificate
for code signing.

This CL replaces "iPhone Developer" by "Apple Development" so that
cmd/gomobile can use the correct certificate to sign the building
application. Otherwise, gomobile throws an error gomobile: failed to
pull the signing certificate to determine your team ID: exit status 44

Updates golang/go#47238

Change-Id: Ia48c03ff7cda39a95159e0f77e7ba7042776f9ef
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346151
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-08-31 15:17:05 +00:00
Hajime Hoshi 23a0503ab4 cmd/gomobile: enable Cgo
This CL gives CGO_ENABLED=1 explicitly when executing gobind since
Cgo is disabled by default when GOOS is given.

This CL also adds importing C to the tests to confirm that Cgo
works correctly.

This CL also updates go.mod since this change requries the change
in go/packages: golang.org/cl/214943

Updates golang/go#27234
Updates golang/go#36547

Change-Id: I66f9697f992f15b52fca7871e4e0ed64ca2b4965
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/214498
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-01-23 02:49:29 +00:00
Hajime Hoshi d309294bef bind: update the golden data for Objective-C
Fixes golang/go#35148

Change-Id: I4ee2b667e1eb3df3f263a66671cf7d6a89804830
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/203398
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-10-25 10:49:55 +00:00
Hana Kim 6d0d39b2ca bind: format generated go code before comparing with golden files
bind_test.go compares the generated Go files against golden files
checked in the repository. The bind package formats some of the
generated Go files, so any changes in the go formatter can break
the tests.

This change makes the test more robust by applying formatting based
on the currently used go version. Since a golden file often
includes multiple go files generated by the bind, the `gofmt`
function splits the golden file using the gobindPreamble marker
and then run format.Source for each chunk. In order to ease the
golden file splitting, this CL also moves the gobindPreamble
to the beginning of each generated file consistently.

It turned out bind omits formatting for some go files (generated
for reverse binding). That needs to be fixed but it is a much
bigger fix. Thus, in this CL, we apply the formatting on the
bind's output as well.

This CL also updates the gobindPreamble to follow the style guide
for generated code. https://golang.org/s/generatedcode

Fixes golang/go#34619

Change-Id: Ia2957693154face2848e051ebbb2373e95d79593
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/198322
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-10-02 17:59:09 +00:00
Hajime Hoshi c6da959549 bind/java, bind/objc: do not use module for reverse binding
Reverse binding is not available with Go module, and some tests
fail due to this. This CL suppresses the errors by disabling Go
modules explicitly.

Updates golang/go#27234

Change-Id: I7483c1dab468548a2efa05ca426addf5c3d97b6e
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/192599
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-08-30 20:13:51 +00:00
Hajime Hoshi cafc553e1a cmd/gobind: fix build-tag, CGO and load trybot failures
* Correctly format build tags to pass into go/packages
* Removes CGO_ENABLED=0 from a packages.Load configuration
* Calls go/packages.Load twice to work around a build cache
* staleness issue

These bugs were introduced by CL 189597.

Updates golang/go#27234.
Updates golang/go#33687.

Change-Id: I3ae6737bf53bbecda0c7e25885b9c6aea5779332
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/190479
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
2019-08-26 17:01:11 +00:00
Hajime Hoshi fe31116dde all: use GOROOT/bin/go instead of go for tests
Using 'go' command in tests is confusing when using a different version
of Go (e.g., go1.13rc1). Use GOROOT/bin/go so that the same Go is used.

Change-Id: I0ca297207acc5e7fd8b291f544302f6c7b0d38e1
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/191517
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-08-23 15:22:30 +00:00
Tim CooijmansandHyang-Ah Hana Kim e47acb2ca7 bind/java: Do not get ApplicationContext via reflection, ask for it when needed.
Previously any library created using gobind used reflection to get the ApplicationContext. The methods used are disallowed in Android 9 causing any library to crash.  However the ApplictionContext is not required and only needed when using RunOnJvm. This change adds an method to set the ApplicationContext when needed, but will not get it by default by using reflection.

Fixes #31364

Change-Id: I83ce69f3b4b59d2cc4a275928f0439e5e4651ba8
GitHub-Last-Rev: b563af1d7fa8f4b3e62751ce9a78c8e2f291d232
GitHub-Pull-Request: golang/mobile#31
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/175103
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-07-11 16:50:09 +00:00
Junda LiuandHyang-Ah Hana Kim 6fa95d984e bind: keep package function comments in java file
previously package level function comments are ignored. this change
keeps the comment in generated java files

Change-Id: I86dcd93b1026c4455d2c4782cbc9f30b514b3107
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/181038
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2019-06-07 21:45:18 +00:00