mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
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
This commit is contained in:
@@ -12,7 +12,7 @@ import "C"
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/mobile/internal/mobileinit"
|
||||
"github.com/netbirdio/gomobile-tvos-fork/internal/mobileinit"
|
||||
)
|
||||
|
||||
//export setContext
|
||||
|
||||
+10
-10
@@ -15,8 +15,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/mobile/internal/importers/java"
|
||||
"golang.org/x/mobile/internal/sdkpath"
|
||||
"github.com/netbirdio/gomobile-tvos-fork/internal/importers/java"
|
||||
"github.com/netbirdio/gomobile-tvos-fork/internal/sdkpath"
|
||||
)
|
||||
|
||||
var gomobileBin string
|
||||
@@ -40,10 +40,10 @@ func testMain(m *testing.M) int {
|
||||
gocmd := filepath.Join(runtime.GOROOT(), "bin", "go")
|
||||
gomobileBin = filepath.Join(binDir, "gomobile"+exe)
|
||||
gobindBin := filepath.Join(binDir, "gobind"+exe)
|
||||
if out, err := exec.Command(gocmd, "build", "-o", gomobileBin, "golang.org/x/mobile/cmd/gomobile").CombinedOutput(); err != nil {
|
||||
if out, err := exec.Command(gocmd, "build", "-o", gomobileBin, "github.com/netbirdio/gomobile-tvos-fork/cmd/gomobile").CombinedOutput(); err != nil {
|
||||
log.Fatalf("gomobile build failed: %v: %s", err, out)
|
||||
}
|
||||
if out, err := exec.Command(gocmd, "build", "-o", gobindBin, "golang.org/x/mobile/cmd/gobind").CombinedOutput(); err != nil {
|
||||
if out, err := exec.Command(gocmd, "build", "-o", gobindBin, "github.com/netbirdio/gomobile-tvos-fork/cmd/gobind").CombinedOutput(); err != nil {
|
||||
log.Fatalf("gobind build failed: %v: %s", err, out)
|
||||
}
|
||||
path := binDir
|
||||
@@ -60,21 +60,21 @@ func TestClasses(t *testing.T) {
|
||||
t.Skipf("java importer is not available")
|
||||
}
|
||||
runTest(t, []string{
|
||||
"golang.org/x/mobile/bind/testdata/testpkg/javapkg",
|
||||
"github.com/netbirdio/gomobile-tvos-fork/bind/testdata/testpkg/javapkg",
|
||||
}, "", "ClassesTest")
|
||||
}
|
||||
|
||||
func TestCustomPkg(t *testing.T) {
|
||||
runTest(t, []string{
|
||||
"golang.org/x/mobile/bind/testdata/testpkg",
|
||||
"github.com/netbirdio/gomobile-tvos-fork/bind/testdata/testpkg",
|
||||
}, "org.golang.custompkg", "CustomPkgTest")
|
||||
}
|
||||
|
||||
func TestJavaSeqTest(t *testing.T) {
|
||||
runTest(t, []string{
|
||||
"golang.org/x/mobile/bind/testdata/testpkg",
|
||||
"golang.org/x/mobile/bind/testdata/testpkg/secondpkg",
|
||||
"golang.org/x/mobile/bind/testdata/testpkg/simplepkg",
|
||||
"github.com/netbirdio/gomobile-tvos-fork/bind/testdata/testpkg",
|
||||
"github.com/netbirdio/gomobile-tvos-fork/bind/testdata/testpkg/secondpkg",
|
||||
"github.com/netbirdio/gomobile-tvos-fork/bind/testdata/testpkg/simplepkg",
|
||||
}, "", "SeqTest")
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ func TestJavaSeqBench(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping benchmark in short mode.")
|
||||
}
|
||||
runTest(t, []string{"golang.org/x/mobile/bind/testdata/benchmark"}, "", "SeqBench")
|
||||
runTest(t, []string{"github.com/netbirdio/gomobile-tvos-fork/bind/testdata/benchmark"}, "", "SeqBench")
|
||||
}
|
||||
|
||||
// runTest runs the Android java test class specified with javaCls. If javaPkg is
|
||||
|
||||
Reference in New Issue
Block a user