From 969a1bf7ddd4ab3d80c165099787f5bf92ca356a Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 9 Dec 2014 17:08:14 -0500 Subject: [PATCH] example/libhellojni: fix build and allow go get golang.org/x/mobile/... Change-Id: Id0cd58705c882ea58cedbee5a6e9aff010c0ad4d Reviewed-on: https://go-review.googlesource.com/1281 Reviewed-by: Andrew Gerrand --- bind/java/doc.go | 6 ++++++ example/libhellojni/hello.c | 2 ++ example/libhellojni/hello.go | 2 ++ example/libhellojni/main.go | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 bind/java/doc.go diff --git a/bind/java/doc.go b/bind/java/doc.go new file mode 100644 index 0000000..0002208 --- /dev/null +++ b/bind/java/doc.go @@ -0,0 +1,6 @@ +// Package java implements the Java language bindings. +// +// See the design document (http://golang.org/s/gobind). +// +// Currently, this works only for android. +package java diff --git a/example/libhellojni/hello.c b/example/libhellojni/hello.c index 6bf27e3..d96b405 100644 --- a/example/libhellojni/hello.c +++ b/example/libhellojni/hello.c @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build android + // See main.go for commentary. #include diff --git a/example/libhellojni/hello.go b/example/libhellojni/hello.go index 9e8b5a1..666666d 100644 --- a/example/libhellojni/hello.go +++ b/example/libhellojni/hello.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build android + package main // #cgo LDFLAGS: -llog diff --git a/example/libhellojni/main.go b/example/libhellojni/main.go index fd6a218..79a16b4 100644 --- a/example/libhellojni/main.go +++ b/example/libhellojni/main.go @@ -26,5 +26,5 @@ package main import "golang.org/x/mobile/app" func main() { - app.Run() + app.Run(app.Callbacks{}) }