2
0
mirror of synced 2025-02-23 23:08:14 +00:00
mobile/misc/androidstudio
Elias Naur d05d36a362 misc/androidstudio: fix the classpath for gobind and gomobile
Before this CL, the JavaCompile.classpath property was evaluated early,
which resulted in missing classpath entries for first-time runs of
gradle. Delay the evaluation, making sure gobind and gomobile receives
the complete classpath.

Change-Id: Iba9be0bbf9f563eb18b2549ac8267f8db3b7dec1
Reviewed-on: https://go-review.googlesource.com/35177
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-01-17 14:22:50 +00:00
..

gobindPlugin invokes gomobile bind command on the specified package.

Usage

build.gradle:

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

gobind {
  // Package to bind. Separate multiple packages with spaces.
  pkg="github.com/someone/somepackage"

  // GOPATH
  GOPATH="/home/gopher"

  // Optional list of architectures. Defaults to all supported architectures.
  GOARCH="arm amd64"

  // Absolute path to the gomobile binary. Optional.
  GOMOBILE="/mypath/bin/gomobile"

  // Absolute path to the gobind binary. Optional.
  GOBIND="/mypath/bin/gobind"

  // Absolute path to the go binary. Optional.
  GO="/usr/local/go/bin/go"

  // Pass extra parameters to command line. Optional.
  GOMOBILEFLAGS="-javapkg my.java.package"
}

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

TODO

  • Find the stale aar file (how?)