Files
gojava/README.md
Sridhar Venkatakrishnan b4b8a3bf54 Add travis badge
2016-03-28 20:13:19 +02:00

22 lines
980 B
Markdown

## GoJava - Java bindings to Go packages [![Build Status](https://travis-ci.org/sridharv/gojava.svg?branch=master)](https://travis-ci.org/sridharv/gojava)
GoJava uses a [forked version of gomobile](https://github.com/sridharv/gomobile-java) to generate Java bindings to Go packages.
The same set of types are supported. Details on how the binding works can be found [here](https://godoc.org/golang.org/x/mobile/cmd/gobind).
### Usage
```
gojava build [-o <jar>] [<pkg1>, [<pkg2>...]]
This generates a jar containing Java bindings to the specified Go packages.
-o string
Path to the generated jar file (default "libgojava.jar")
```
You can include the generated jar in your build using the build tool of your choice.
The jar contains a native library (built for the build platform) which is loaded automatically.
Cross platform builds are not currently supported.
NOTE: This has only been tested on an OSX developer machine and not in production.