mobile/misc/androidstudio
Hyang-Ah (Hana) Kim dc0c746bbb misc/androidstudio: change GobindPlugin parameters
Plugin version 0.2.2:

While debugging golang/go#11895 I noticed the PATH param is less
intuitive that I hoped for. This change makes the plugin requires
instead:

   pkg: the package to compile
   GOMOBILE: absolute path to gomobile
   GO: absolute path to go
   GOPATH: gopath.

GOMOBILE/GO params are optional if Android Studio is configured
to include right paths in its environment.

Additional changes included in this cl:
  - GOMOBILEFLAGS param for users to optionally specify gomobile
    options e.g. -v -x which will be useful for debugging.
  - Set src/target java version to 1.7. Previous versions of plugins
    were compiled with JDK8 by accident, which prevented use of
    the android studio recommended JDK7.

Change-Id: Ie7818eb20c5220b16ed0ebccfb91520fe03e6ccd
Reviewed-on: https://go-review.googlesource.com/12923
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-07-31 19:59:48 +00:00
..
src misc/androidstudio: change GobindPlugin parameters 2015-07-31 19:59:48 +00:00
.gitignore misc/androidstudio: source code for gomobile bind gradle plugin. 2015-07-22 22:16:26 +00:00
README.md misc/androidstudio: change GobindPlugin parameters 2015-07-31 19:59:48 +00:00
build.gradle misc/androidstudio: change GobindPlugin parameters 2015-07-31 19:59:48 +00:00
settings.gradle misc/androidstudio: source code for gomobile bind gradle plugin. 2015-07-22 22:16:26 +00:00

README.md

gobindPlugin invokes gomobile bind command on the specified package.

Usage

build.gradle:

plugins {
  id "org.golang.mobile.bind" version "0.2.2"
}

gobind {
  // package to bind
  pkg "github.com/someone/somepackage"

  // GOPATH
  GOPATH "/home/gopher"

  // Absolute path to the gomobile binary
  GOMOBILE "/mypath/bin/gomobile"

  // Absolute path to the go binary
  GO "/usr/local/go/bin/go"
}

For details: https://plugins.gradle.org/plugin/org.golang.mobile.bind

TODO

  • Find the stale aar file (how?)