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>
Fixesgolang/go#49499
Change-Id: Ia65b61b9e0707321439ea85d06bac5ed507b58c7
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/369196
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Changkun Ou <mail@changkun.de>
TryBot-Result: Gopher Robot <gobot@golang.org>
Change-Id: I0db9c1396f003eca30196aab14523d1cf7b85197
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/388375
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: Ian Lance Taylor <iant@golang.org>
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>
Add mavenCentral to repositories
needed to pull in necessary build tools dependencies
Change-Id: I9b8525430d4ba9535ad0d3bc6b4acd94f6ea0642
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/360835
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Robert Findley <rfindley@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Go install requires a version to be provided after the package name.
gomobile init command is updated to reflect this new requirement
Fixesgolang/go#50994
Change-Id: I014bd6815d9620415ceb43dd7e0aea3afac60556
GitHub-Last-Rev: 3a07fa669175c34b5948de4abe74ab9092c83934
GitHub-Pull-Request: golang/mobile#75
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/384414
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
iOS builders fail to build the mobile repository because of compile
warnings.
1. "go build golang.org/x/mobile/app" can result in build error because
of the warning "missing [super prepareOpenGL] call".
2. "null passed to a callee that requires a non-null argument" because
argv is expected to not be a null argument.
Resolve these warnings.
Change-Id: I86130abc3a104be388475f5c316f5c3aef13aa92
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/387094
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Run-TryBot: Changkun Ou <mail@changkun.de>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
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>
Defining GLES_SILENCE_DEPRECATION did not take any effects. Use -D
instead.
Change-Id: I9c0602b38d39020b9539fdb8030fef3a7b366929
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/374499
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>
It is a full of unused code. Remove it.
Change-Id: I086f244adde57c8c9f1fc73b46e25550f15562f7
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/369197
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This was resolved in CL 11733. The "C.stopApp()" triggers the
termination of an app.
Change-Id: I48d4b798e42bc0c8b780ed5c0ec50968b62d0afa
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/369199
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
The TODO message was introduced in CL 13041, but later resolved
in CL 77070 because it allows bundle id customization.
Remove the oudated TODO message.
Change-Id: Ib32793ace937f67b5c95d6efadd6d4eef48a8986
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/369200
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Alex Rakoczy <alex@golang.org>
Run-TryBot: Alex Rakoczy <alex@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Taking the same approach from the widely used CocoaPods who had facing
the same issue since Xcode 12. See discussion:
https://github.com/CocoaPods/CocoaPods/pull/9905Fixesgolang/go#48677
Change-Id: I92584e6cf87e34747db3ce32cda837d55e5f8b2c
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/369198
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Starting from NDK 23, GNU binutils are fully migrated to LLVM binutils.
Use LLVM if GNU binutils are missing.
Fixesgolang/go#49808
Change-Id: Iccb40780390a66081fc811d717c7357194b92acf
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/369195
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The modules in x/mobile are still tested under Go 1.16, which emits a
vet warning for files that have "//go:build" constraint comments
without matching "// +build" comments.
This fixes a build failure observed on the Go dashboard:
https://build.golang.org/log/2925343437d0c0559bcfa9d9de740a3a1aef2dc3
Change-Id: Ic0e3ed151a2ea3262d853c4e22cf042d54230ede
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/362575
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Without this header, the x/mobile build fails on my workstation.
(Compare CL 359695 in x/exp.)
Change-Id: If32fe6bc2945d31fed5cffca5e347970b344e40e
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/362574
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I4cef2b60756b3318c123b832bcdb719d2d45fadc
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/360607
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
And bring iOS app up to Android capabilities.
Fixesgolang/go#48694
Change-Id: I0e853cab102e34053ecdb17edb99644aa2f8651a
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/357977
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Peter Weinberger <pjw@google.com>
Now the user input is printed in bold, so it is obvious even with
out this dummy prompt-like symbol. This makes the output more like
the desktop version of Ivy tool.
Change-Id: I146685815ceb52aa5da6ddaa64f764e43839ffa9
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/356733
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
Demo feature is implemented by reading the demo.ivy file included
as an asset, read lines, and feed each line to mobile.Eval if it
is not a comment line. Comments can start from the middle of a line
so previously, the code simply looked for '#' in each line and
treated the substring starting from it as a comment. This assumption
is not correct - see ")format '%#x'". Without proper parsing, it is
hard to do it correctly. This CL passes the entire line to Ivy as
it is - the backend correctly parses the line with comments.
One drawback of this change is, unlike the line comments, we don't
apply the style for comments (gray font). But correctness is more
important. This also simplifies the code.
This CL implements the 'quit' command that terminates a demo
session (as mentioned in the demo.ivy script).
Change-Id: Ib0801338e0dd34c52c6c6209fe47a1846e71f0c8
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/356732
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Android App emulates terminal-like functionality in WebView by
appending the input and output lines of Ivy to the WebView HTML
document as a new div entry using javascript. The app used
Android's TextUtils.htmlEncode to get HTML escaped representation
of the input and output. Among those escaped characters, `&` is
included (HTML entity prefix).
Ivy's mobile.Eval returns lines that include HTML entities (e.g.
\ instead of backslash -- see
https://github.com/robpike/ivy/blob/master/mobile/mobile.go#L43)
TextUtils.htmlEncode escapes this `&` and as a result, the backslash
is left broken.
escapeHtmlTags is identical to TextUtils.htmlEncode except it
leaves the entity alone.
Change-Id: Ifec401f07b46f4c6aee6d8df7d61933ae8dbc666
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/356731
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Peter Weinberger <pjw@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
Output from ivy is carefully formatted to work best in terminal.
Use of monospace & pre-wrap white space make table-format output look nicer.
Change-Id: If11fd57c8e685c01825fb1c2dd8b6d24fe860850
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/356730
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Peter Weinberger <pjw@google.com>
We plan to move example/ivy to a separate module by adding go.mod
in the directory. That change will break gobind tests that depend
on golang.org/x/tools/packages/packagestest which didn't handle
nested module directories. Update the dependency to pick up the fix
(https://go-review.googlesource.com/c/tools/+/358037)
Change-Id: Ie333093a7f48e50623738ff7c18748161ce62175
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/357617
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
fix file data align to 4
Change-Id: Ie88c46521e216b3f83a8dc3495591cd19bce83c6
GitHub-Last-Rev: aebf3cd7ff0d77050659e9269f7eddaeff364eff
GitHub-Pull-Request: golang/mobile#73
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/351789
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
This updates examples for the changes in golang.org/cl/334689 for
.xcframework files and Mac Catalyst.
Depends on golang.org/cl/334689
https://go-review.googlesource.com/c/mobile/+/334689/28/example/bind/ios/README#1
Change-Id: Ice89e7e675c8f190c7040407908f619a7631fd2b
GitHub-Last-Rev: 64da8e6cad76f3e0530e36895bbfeacab7439b35
GitHub-Pull-Request: golang/mobile#72
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/350489
Reviewed-by: Changkun Ou <euryugasaki@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
The default Xcode project settings do not specify any team ID.
If we open the Xcode project in Xcode, it won't compile and deploy
the app directly via Xcode unless a user manually selects the team
account. This is an extra effort. Since we can detect team ID
automatically embeds the teamID directly into the project settings
so it better helps the user to compile and deploy apps without getting
into the project settings.
Change-Id: I268653f66280bb6cf013f0a28891e4382e4de576
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/351409
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
This is is a follow-up from my previous PR (#65). It makes gomobile
aware of GOOS=ios and adds support for specifying specific Apple
platforms, instead of overloading the "ios" platform.
Supported platforms: ios, iossimulator, macos, and maccatalyst
These can now be specified the -target argument to gomobile, e.g.:
gomobile build -target=ios,iossimulator,macos,maccatalyst
It preserves the current behavior of -target=ios, which will build for
ios and iossimulator on supported architectures (arm64 and amd64).
It adds platform-specific build tags so Go code can discriminate between
different Apple platforms like maccatalyst (UIKit on macOS).
This PR also fixes a number of broken tests.
TODO: cgo has a bug where c-archive builds targeting Catalyst will fail
unless -tags=ios is supplied. See https://golang.org/issues/47228
Fixes https://golang.org/issues/47212
Updates https://golang.org/issues/47228
Change-Id: Ib1a2f5302c5edd0704c13ffbe8f4061211f50d4e
GitHub-Last-Rev: 01ab28e63fe6890a9f9783e3fc41b1c895b0274d
GitHub-Pull-Request: golang/mobile#70
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/334689
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
This CL allows a (super) outdated Xcode project - the Pob Pike's Ivy
work again and can compile and run on the latest iOS (tested on iOS 15
beta 8).
There are some changes to the project that might be worth mentioning:
- The UIWebView is deprecated in iOS 10, this CL migrates the code to
use the latest recommended WKWebView.
- The old project does not compatible with iOS 9 and later, the CL upgrades
the development target to iOS 14, and makes it compatible with all
all orientation (Portrait, landscape, upside down).
- The old Launch.storyboard is deprecated, the Main.storyboard cannot
be opened (will cause Xcode crash), this change slightly reworked on
the UI management, and merges the purpose of Launch.storyboard as well
as Main.storyboard into the single Main.storyboard.
- Injects a meta tag into the HTML header so that the fonts are properly
scaled on (very) high-resolution display.
- The app is not only tested on a simulator but also physically tested
on an iPhone 12 Pro.
See screenshots:
- iOS Home: https://changkun.de/midgard/img/ivy-ios-home.png
- iOS Help: https://changkun.de/midgard/img/ivy-ios-help.png
- Mac Home: https://changkun.de/midgard/img/ivy-mac-home.png
- Mac Help: https://changkun.de/midgard/img/ivy-mac-help.png
Change-Id: I1b8dec6b17d5722fddb1011453b3c8f86e4900e4
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346949
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
As discussed in CL 346150, conditional bitcode build flag was introduced
in CL 214899, for Go >= 1.14 but not Go 1.13.
Since we have dropped the support for 1.13, all bitcode conditions
can be removed.
Hence this CL removes it.
Updates golang/go#47952
Change-Id: I0436cad8d5ab5675b647e25e7dfa85af85996a7e
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346390
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
This change permits gomobile to build iOS applications by properly
set GOOS=ios in the build process. The change is locally tested on
darwin/arm64, and golang.org/x/mobile/example/basic can be build
using the following commands:
gomobile build -target=android -o=basic.apk \
golang.org/x/mobile/example/basic
gomobile build -target=ios -bundleid=org.golang.gomobiletest \
-o=basic.app golang.org/x/mobile/example/basic
The built binaries are also tested on iOS 15 beta7 and Android 12 API31.
Updates golang/go#47952Fixesgolang/go#47238
Change-Id: Ibf40a77933ac957640c78d0dbc1af043477e4b3a
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346150
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
There are several tests are skipped for Android but they may still be
tested on iOS. This will leads to trybot failure.
This CL skips those tests and allow them to pass on iOS.
Furthermore, deprecated C function warning are promoted to errors on
builders, this CL also fixes a deprecated asl_log for iOS in mobileinit.
Change-Id: Ie9da57a20dd75ef3d29b393e30aef01051bab454
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346391
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
The removed binary XML was introduced in CL 2653 for the TestBinaryXML.
But in CL 16150, the test was reworked and the binary XML was never
used since then.
Delete it.
Change-Id: I80fd90264142bdcd4a6d88a377e36cba64088a5a
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346389
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
In darwin/arm64, with Xcode13 toolchain, the nm shows a prefix `_` in
the import path, which was previously not handled.
Such as:
000000010009cd70 t _golang.org/x/mobile/app.(*app).Events
000000010009ce70 t _golang.org/x/mobile/app.(*app).Filter
000000010009cdf0 t _golang.org/x/mobile/app.(*app).Publish
000000010009cd80 t _golang.org/x/mobile/app.(*app).Send
000000010009d870 t _golang.org/x/mobile/app.(*app).loop
000000010009d7f0 t _golang.org/x/mobile/app.(*app).loop.func1
This change fixes the regexp for import package extraction and permits
TestRegexImportGolangXPackage to pass.
Change-Id: I5f8b02177c8b022283276f2ddffaa8bb277aa255
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346154
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
The current TestNdkRoot may fail if ANDROID_HOME and ANDROID_NDK_HOME
are both set from the environment. This is because ndkRoot will first
check ANDROID_HOME, if fails, then check ANDROID_NDK_HOME.
The test was intended to reset the ANDROID_HOME and expecting an error
for fetching ANDROID_NDK_HOME. However, if ANDROID_NDK_HOME is set,
the ndkRoot will not return an error, which may fail the test.
This change moves the environment settings around to permit TestNdkRoot
to pass.
Change-Id: I17ce6dbeec186d35f7a4ba2d8275a43a862c306d
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/346152
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
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>
This reverts commit 76c259c465ba39f84de7e2751a666612ddca556b.
Reason for revert: Regression. Specifying architectures doesn't work. See golang/go#47212
Change-Id: I3200316cf28535cfb48e37636bc3b9d14d13e91e
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/334590
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Add support for macOS (non-Catalyst) and Catalyst targets.
The compiled library is packaged into a "fat" XCFramework file (as
opposed to a Framework), which includes binaries for iOS, macOS,
MacCatalyst (iOS on macOS), and iOS Simulator targets, for amd64 and
arm64 architectures.
The generated XCFramework file is suitable for distribution as a binary
Swift Package Manager package:
https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages
This change is based on earlier work:
https://github.com/golang/mobile/pull/45https://github.com/golang/mobile/pull/63Fixesgolang/go#36856
Change-Id: Iabe535183c7215c68838d6c8f31618d8bceefdcf
GitHub-Last-Rev: 623f8f38653c856d2cd07e721f0932e515b50d02
GitHub-Pull-Request: golang/mobile#65
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/310949
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
As golang/go#32963 has been fixed, gomobile-build test on iOS now
works.
Updates golang/go#32963
Change-Id: I96add914d1f97de6506f26e4ae0c07e8c884cb6a
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/214957
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Hajime Hoshi <hajimehoshi@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
The check when looking for android platform is unnecessarily stringent
in that the error would be caught by the call to os.Stat, and
it fails when the android platform folder is a symlink,
which is the case when developing on NixOs.
Change-Id: I07a96c969ffa29dea8bf8e353264e8597dcdc550
GitHub-Last-Rev: c684b80402ad30ad52eb854951aab69657ad7a5d
GitHub-Pull-Request: golang/mobile#55
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/267081
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This should fix an incompatibility between
golang.org/x/tools/go/packages/packagestest and Go 1.17.
Fixesgolang/go#46418
Change-Id: If1416f53685632d705e7814354f792eb30de88a2
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/323149
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild
Change-Id: I30822eb504168b037ed3ec0f7759da1f41251f52
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/294374
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
For the Android NDK, between r21 and r22 the NDK compiler switched the
default from "-fcommon" to "-fno-common", which causes duplicate
definitions when building the examples given the current C code. To
fix things, rework the C code to insure that we have a single
definition and an "extern" reference to the objects in question.
Updates golang/go#44121.
Change-Id: If198d5cfd977a7cfd1a37652d3a1916d8c8dbcb7
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/290031
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Than McIntosh <thanm@google.com>
As of Go1.16, `go build` fails if go.sum does not exist. This change
fixes this issue by forcing to create go.sum by calling `go mod tidy`.
Closesgolang/go#44162
Change-Id: Ibba738503d1a58c6533b2427dd4efa6954b8eaa3
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/290409
Run-TryBot: Hajime Hoshi <hajimehoshi@gmail.com>
Trust: Than McIntosh <thanm@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>