Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix go.mod and compilation. #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ The Go mobile repository holds packages and build tools for using Go on mobile p

Package documentation as a starting point:

- [Building all-Go apps](https://golang.org/x/mobile/app)
- [Building libraries for SDK apps](https://golang.org/x/mobile/cmd/gobind)
- [Building all-Go apps](https://github.com/SkycoinProject/gomobile/app)
- [Building libraries for SDK apps](https://github.com/SkycoinProject/gomobile/cmd/gobind)

![Caution image](doc/caution.png)

Expand All @@ -17,8 +17,8 @@ This is early work and installing the build system requires Go 1.5.
Follow the instructions on
[golang.org/wiki/Mobile](https://golang.org/wiki/Mobile)
to install the gomobile command, build the
[basic](https://golang.org/x/mobile/example/basic)
and the [bind](https://golang.org/x/mobile/example/bind) example apps.
[basic](https://github.com/SkycoinProject/gomobile/example/basic)
and the [bind](https://github.com/SkycoinProject/gomobile/example/bind) example apps.

--

Expand Down
16 changes: 8 additions & 8 deletions app/android.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ import (
"time"
"unsafe"

"golang.org/x/mobile/app/internal/callfn"
"golang.org/x/mobile/event/key"
"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/paint"
"golang.org/x/mobile/event/size"
"golang.org/x/mobile/event/touch"
"golang.org/x/mobile/geom"
"golang.org/x/mobile/internal/mobileinit"
"github.com/SkycoinProject/gomobile/app/internal/callfn"
"github.com/SkycoinProject/gomobile/event/key"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/paint"
"github.com/SkycoinProject/gomobile/event/size"
"github.com/SkycoinProject/gomobile/event/touch"
"github.com/SkycoinProject/gomobile/geom"
"github.com/SkycoinProject/gomobile/internal/mobileinit"
)

// RunOnJVM runs fn on a new goroutine locked to an OS thread with a JNIEnv.
Expand Down
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
package app

import (
"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/size"
"golang.org/x/mobile/gl"
_ "golang.org/x/mobile/internal/mobileinit"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/size"
"github.com/SkycoinProject/gomobile/gl"
_ "github.com/SkycoinProject/gomobile/internal/mobileinit"
//"log"
)

Expand All @@ -31,7 +31,7 @@ type App interface {
// - paint.Event
// - size.Event
// - touch.Event
// from the golang.org/x/mobile/event/etc packages. Other packages may
// from the github.com/SkycoinProject/gomobile/event/etc packages. Other packages may
// define other event types that are carried on this channel.
Events() <-chan interface{}

Expand Down
6 changes: 3 additions & 3 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"testing"
"time"

"golang.org/x/mobile/app/internal/apptest"
"golang.org/x/mobile/event/size"
"github.com/SkycoinProject/gomobile/app/internal/apptest"
"github.com/SkycoinProject/gomobile/event/size"
)

// TestAndroidApp tests the lifecycle, event, and window semantics of a
Expand Down Expand Up @@ -67,7 +67,7 @@ func TestAndroidApp(t *testing.T) {
}
defer os.Chdir(origWD)

run(t, "gomobile", "install", "golang.org/x/mobile/app/internal/testapp")
run(t, "gomobile", "install", "github.com/SkycoinProject/gomobile/app/internal/testapp")

ln, err := net.Listen("tcp4", "localhost:0")
if err != nil {
Expand Down
12 changes: 6 additions & 6 deletions app/darwin_desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (
"runtime"
"sync"

"golang.org/x/mobile/event/key"
"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/paint"
"golang.org/x/mobile/event/size"
"golang.org/x/mobile/event/touch"
"golang.org/x/mobile/geom"
"github.com/SkycoinProject/gomobile/event/key"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/paint"
"github.com/SkycoinProject/gomobile/event/size"
"github.com/SkycoinProject/gomobile/event/touch"
"github.com/SkycoinProject/gomobile/geom"
)

var initThreadID uint64
Expand Down
10 changes: 5 additions & 5 deletions app/darwin_ios.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ import (
"strings"
"sync"

"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/paint"
"golang.org/x/mobile/event/size"
"golang.org/x/mobile/event/touch"
"golang.org/x/mobile/geom"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/paint"
"github.com/SkycoinProject/gomobile/event/size"
"github.com/SkycoinProject/gomobile/event/touch"
"github.com/SkycoinProject/gomobile/geom"
)

var initThreadID uint64
Expand Down
22 changes: 11 additions & 11 deletions app/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ is to write a Go library and use `gomobile bind` to generate language
bindings for Java and Objective-C. Building a library does not
require the app package. The `gomobile bind` command produces output
that you can include in an Android Studio or Xcode project. For more
on language bindings, see https://golang.org/x/mobile/cmd/gobind.
on language bindings, see https://github.com/SkycoinProject/gomobile/cmd/gobind.

The second way is to write an app entirely in Go. The APIs are limited
to those that are portable between both Android and iOS, in particular
Expand All @@ -25,7 +25,7 @@ with `gomobile build`, which directly produces runnable output for
Android and iOS.

The gomobile tool can get installed with go get. For reference, see
https://golang.org/x/mobile/cmd/gomobile.
https://github.com/SkycoinProject/gomobile/cmd/gomobile.

For detailed instructions and documentation, see
https://golang.org/wiki/Mobile.
Expand All @@ -47,9 +47,9 @@ goroutine as other code that calls OpenGL.
import (
"log"

"golang.org/x/mobile/app"
"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/paint"
"github.com/SkycoinProject/gomobile/app"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/paint"
)

func main() {
Expand All @@ -69,11 +69,11 @@ goroutine as other code that calls OpenGL.
An event is represented by the empty interface type interface{}. Any value can
be an event. Commonly used types include Event types defined by the following
packages:
- golang.org/x/mobile/event/lifecycle
- golang.org/x/mobile/event/mouse
- golang.org/x/mobile/event/paint
- golang.org/x/mobile/event/size
- golang.org/x/mobile/event/touch
- github.com/SkycoinProject/gomobile/event/lifecycle
- github.com/SkycoinProject/gomobile/event/mouse
- github.com/SkycoinProject/gomobile/event/paint
- github.com/SkycoinProject/gomobile/event/size
- github.com/SkycoinProject/gomobile/event/touch
For example, touch.Event is the type that represents touch events. Other
packages may define their own events, and send them on an app's event channel.

Expand All @@ -82,4 +82,4 @@ response to lifecycle events. Such packages should call:
app.RegisterFilter(etc)
in an init function inside that package.
*/
package app // import "golang.org/x/mobile/app"
package app // import "github.com/SkycoinProject/gomobile/app"
16 changes: 8 additions & 8 deletions app/internal/testapp/testapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import (
"log"
"net"

"golang.org/x/mobile/app"
"golang.org/x/mobile/app/internal/apptest"
"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/paint"
"golang.org/x/mobile/event/size"
"golang.org/x/mobile/event/touch"
"golang.org/x/mobile/gl"
"github.com/SkycoinProject/gomobile/app"
"github.com/SkycoinProject/gomobile/app/internal/apptest"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/paint"
"github.com/SkycoinProject/gomobile/event/size"
"github.com/SkycoinProject/gomobile/event/touch"
"github.com/SkycoinProject/gomobile/gl"
)

func main() {
Expand Down Expand Up @@ -70,7 +70,7 @@ func main() {
glctx.ClearColor(0, 1, 0, 1)
}
glctx.Clear(gl.COLOR_BUFFER_BIT)
a.Publish()
// a.Publish()
}
if sendPainting {
comm.Send("paint", color)
Expand Down
8 changes: 4 additions & 4 deletions app/shiny.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (

"golang.org/x/exp/shiny/driver/gldriver"
"golang.org/x/exp/shiny/screen"
"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/mouse"
"golang.org/x/mobile/event/touch"
"golang.org/x/mobile/gl"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/mouse"
"github.com/SkycoinProject/gomobile/event/touch"
"github.com/SkycoinProject/gomobile/gl"
)

func main(f func(a App)) {
Expand Down
24 changes: 12 additions & 12 deletions app/x11.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"runtime"
"time"

"golang.org/x/mobile/event/lifecycle"
"golang.org/x/mobile/event/paint"
"golang.org/x/mobile/event/size"
"golang.org/x/mobile/event/touch"
"golang.org/x/mobile/geom"
"github.com/SkycoinProject/gomobile/event/lifecycle"
"github.com/SkycoinProject/gomobile/event/paint"
"github.com/SkycoinProject/gomobile/event/size"
"github.com/SkycoinProject/gomobile/event/touch"
"github.com/SkycoinProject/gomobile/geom"
)

func init() {
Expand Down Expand Up @@ -58,20 +58,20 @@ func main(f func(App)) {
// TODO: can we get the actual vsync signal?
ticker := time.NewTicker(time.Second / 60)
defer ticker.Stop()
var tc <-chan time.Time
// var tc <-chan time.Time

for {
select {
case <-donec:
return
case <-workAvailable:
theApp.worker.DoWork()
case <-theApp.publish:
C.swapBuffers()
tc = ticker.C
case <-tc:
tc = nil
theApp.publishResult <- PublishResult{}
// case <-theApp.publish:
// C.swapBuffers()
// tc = ticker.C
// case <-tc:
// tc = nil
// theApp.publishResult <- PublishResult{}
}
C.processEvents()
}
Expand Down
2 changes: 1 addition & 1 deletion asset/asset_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ import (
"sync"
"unsafe"

"golang.org/x/mobile/internal/mobileinit"
"github.com/SkycoinProject/gomobile/internal/mobileinit"
)

var assetOnce sync.Once
Expand Down
2 changes: 1 addition & 1 deletion asset/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
//
// For consistency when debugging on a desktop, assets are read from a
// directory named assets under the current working directory.
package asset // import "golang.org/x/mobile/asset"
package asset // import "github.com/SkycoinProject/gomobile/asset"
4 changes: 2 additions & 2 deletions bind/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
// See the documentation on the gobind command for usage details
// and the list of currently supported types.
// (http://godoc.org/golang.org/x/mobile/cmd/gobind)
package bind // import "golang.org/x/mobile/bind"
// (http://godoc.org/github.com/SkycoinProject/gomobile/cmd/gobind)
package bind // import "github.com/SkycoinProject/gomobile/bind"

// TODO(crawshaw): slice support
// TODO(crawshaw): channel support
Expand Down
6 changes: 3 additions & 3 deletions bind/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"strings"
"testing"

"golang.org/x/mobile/internal/importers"
"golang.org/x/mobile/internal/importers/java"
"golang.org/x/mobile/internal/importers/objc"
"github.com/SkycoinProject/gomobile/internal/importers"
"github.com/SkycoinProject/gomobile/internal/importers/java"
"github.com/SkycoinProject/gomobile/internal/importers/objc"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions bind/genclasses.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"unicode"
"unicode/utf8"

"golang.org/x/mobile/internal/importers"
"golang.org/x/mobile/internal/importers/java"
"github.com/SkycoinProject/gomobile/internal/importers"
"github.com/SkycoinProject/gomobile/internal/importers/java"
)

type (
Expand Down Expand Up @@ -941,7 +941,7 @@ import "C"

import (
"Java"
_seq "golang.org/x/mobile/bind/seq"
_seq "github.com/SkycoinProject/gomobile/bind/seq"
)

`
Expand Down
2 changes: 1 addition & 1 deletion bind/gengo.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ func (g *goGen) genPreamble() {
g.Printf(goPreamble, pkgName, pkgPath)
g.Printf("import (\n")
g.Indent()
g.Printf("_seq \"golang.org/x/mobile/bind/seq\"\n")
g.Printf("_seq \"github.com/SkycoinProject/gomobile/bind/seq\"\n")
for _, imp := range g.imports {
g.Printf("%s\n", imp)
}
Expand Down
2 changes: 1 addition & 1 deletion bind/genjava.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"regexp"
"strings"

"golang.org/x/mobile/internal/importers/java"
"github.com/SkycoinProject/gomobile/internal/importers/java"
)

// TODO(crawshaw): disallow basic android java type names in exported symbols.
Expand Down
2 changes: 1 addition & 1 deletion bind/genobjc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"math"
"strings"

"golang.org/x/mobile/internal/importers/objc"
"github.com/SkycoinProject/gomobile/internal/importers/objc"
)

// TODO(hyangah): handle method name conflicts.
Expand Down
4 changes: 2 additions & 2 deletions bind/genobjcw.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path"
"strings"

"golang.org/x/mobile/internal/importers/objc"
"github.com/SkycoinProject/gomobile/internal/importers/objc"
)

type (
Expand Down Expand Up @@ -319,7 +319,7 @@ func (g *ObjcWrapper) GenGo() {
g.Printf("// #include \"interfaces.h\"\n")
g.Printf("import \"C\"\n\n")
g.Printf("import \"ObjC\"\n")
g.Printf("import _seq \"golang.org/x/mobile/bind/seq\"\n")
g.Printf("import _seq \"github.com/SkycoinProject/gomobile/bind/seq\"\n")

for _, n := range g.types {
for _, f := range n.Funcs {
Expand Down
4 changes: 2 additions & 2 deletions bind/java/context_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package java // import "golang.org/x/mobile/bind/java"
package java // import "github.com/SkycoinProject/gomobile/bind/java"

// #cgo LDFLAGS: -llog
//
Expand All @@ -12,7 +12,7 @@ import "C"
import (
"unsafe"

"golang.org/x/mobile/internal/mobileinit"
"github.com/SkycoinProject/gomobile/internal/mobileinit"
)

//export setContext
Expand Down
2 changes: 1 addition & 1 deletion bind/java/seq_android.go.support
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import "C"
import (
"unsafe"

"golang.org/x/mobile/bind/seq"
"github.com/SkycoinProject/gomobile/bind/seq"
)

// DestroyRef is called by Java to inform Go it is done with a reference.
Expand Down
Loading