@@ -726,7 +726,7 @@ func doAndroidArchive(cmdline []string) {
726
726
log .Fatal ("Please ensure ANDROID_NDK points to your Android NDK" )
727
727
}
728
728
// Build the Android archive and Maven resources
729
- build .MustRun (goTool ("get" , "golang.org/x/mobile/cmd/gomobile" ))
729
+ build .MustRun (goTool ("get" , "golang.org/x/mobile/cmd/gomobile" , "golang.org/x/mobile/cmd/gobind" ))
730
730
build .MustRun (gomobileTool ("init" , "--ndk" , os .Getenv ("ANDROID_NDK" )))
731
731
build .MustRun (gomobileTool ("bind" , "--target" , "android" , "--javapkg" , "org.ethereum" , "-v" , "github.com/ethereum/go-ethereum/mobile" ))
732
732
@@ -777,9 +777,10 @@ func gomobileTool(subcmd string, args ...string) *exec.Cmd {
777
777
cmd .Args = append (cmd .Args , args ... )
778
778
cmd .Env = []string {
779
779
"GOPATH=" + build .GOPATH (),
780
+ "PATH=" + GOBIN + string (os .PathListSeparator ) + os .Getenv ("PATH" ),
780
781
}
781
782
for _ , e := range os .Environ () {
782
- if strings .HasPrefix (e , "GOPATH=" ) {
783
+ if strings .HasPrefix (e , "GOPATH=" ) || strings . HasPrefix ( e , "PATH=" ) {
783
784
continue
784
785
}
785
786
cmd .Env = append (cmd .Env , e )
@@ -846,7 +847,7 @@ func doXCodeFramework(cmdline []string) {
846
847
env := build .Env ()
847
848
848
849
// Build the iOS XCode framework
849
- build .MustRun (goTool ("get" , "golang.org/x/mobile/cmd/gomobile" ))
850
+ build .MustRun (goTool ("get" , "golang.org/x/mobile/cmd/gomobile" , "golang.org/x/mobile/cmd/gobind" ))
850
851
build .MustRun (gomobileTool ("init" ))
851
852
bind := gomobileTool ("bind" , "--target" , "ios" , "--tags" , "ios" , "-v" , "github.com/ethereum/go-ethereum/mobile" )
852
853
0 commit comments