2015-07-22 16:56:39 -04:00
|
|
|
gobindPlugin invokes gomobile bind command on the specified package.
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
|
|
|
build.gradle:
|
|
|
|
<pre>
|
|
|
|
plugins {
|
2018-02-20 10:25:44 -05:00
|
|
|
id "org.golang.mobile.bind" version "0.2.11"
|
2015-07-22 16:56:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
gobind {
|
2016-03-11 10:59:18 +01:00
|
|
|
// Package to bind. Separate multiple packages with spaces.
|
2016-11-21 18:17:58 +09:00
|
|
|
pkg="github.com/someone/somepackage"
|
2015-07-22 16:56:39 -04:00
|
|
|
|
|
|
|
// GOPATH
|
2016-11-21 18:17:58 +09:00
|
|
|
GOPATH="/home/gopher"
|
2015-07-22 16:56:39 -04:00
|
|
|
|
2016-03-07 18:46:38 +01:00
|
|
|
// Optional list of architectures. Defaults to all supported architectures.
|
|
|
|
GOARCH="arm amd64"
|
|
|
|
|
2016-09-30 12:53:57 +02:00
|
|
|
// Absolute path to the gomobile binary. Optional.
|
2016-11-21 18:17:58 +09:00
|
|
|
GOMOBILE="/mypath/bin/gomobile"
|
2015-07-30 13:41:20 -04:00
|
|
|
|
2016-12-05 11:29:30 +01:00
|
|
|
// Absolute path to the gobind binary. Optional.
|
2016-11-21 18:17:58 +09:00
|
|
|
GOBIND="/mypath/bin/gobind"
|
2016-09-30 12:53:57 +02:00
|
|
|
|
|
|
|
// Absolute path to the go binary. Optional.
|
2016-11-21 18:17:58 +09:00
|
|
|
GO="/usr/local/go/bin/go"
|
2016-04-14 11:19:16 +07:00
|
|
|
|
2016-09-30 12:53:57 +02:00
|
|
|
// Pass extra parameters to command line. Optional.
|
2016-11-21 18:17:58 +09:00
|
|
|
GOMOBILEFLAGS="-javapkg my.java.package"
|
2015-07-22 16:56:39 -04:00
|
|
|
}
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
For details:
|
|
|
|
https://plugins.gradle.org/plugin/org.golang.mobile.bind
|
|
|
|
|
|
|
|
# TODO
|
|
|
|
|
|
|
|
* Find the stale aar file (how?)
|