mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
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>
This commit is contained in:
+2
-1
@@ -21,6 +21,7 @@ public class Seq {
|
||||
Class.forName("go.LoadJNI");
|
||||
} catch (ClassNotFoundException e) {
|
||||
// Ignore, assume the user will load JNI for it.
|
||||
Log.w("GoSeq", "LoadJNI class not found");
|
||||
}
|
||||
|
||||
initSeq();
|
||||
@@ -239,7 +240,7 @@ public class Seq {
|
||||
if (refnum <= 0) {
|
||||
// We don't keep track of the Go object.
|
||||
// This must not happen.
|
||||
Log.wtf("Seq", "dec request for Go object "+ refnum);
|
||||
Log.wtf("GoSeq", "dec request for Go object "+ refnum);
|
||||
return;
|
||||
}
|
||||
// Java objects are removed on request of Go.
|
||||
|
||||
Reference in New Issue
Block a user