misc,example/bind/hello: remove the Gradle plugin
And replace the plugin with instructions for rebuilding the .aar files
for the bind and ivy examples.
While here, fix a compile error in the Ivy example caused by gomobile
no longer prepending org.golang. to its generated Java packages by
default.
Fixes golang/go#25314
Fixes golang/go#28098
Fixes golang/go#25184
Change-Id: Iaccdd50850a185414ebcf21427cfd7f625c6a298
Reviewed-on: https://go-review.googlesource.com/c/141057
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/example/bind/android/README b/example/bind/android/README
index f60569f..54ede5f 100644
--- a/example/bind/android/README
+++ b/example/bind/android/README
@@ -1,4 +1,11 @@
Go bind android app example
-Set the GOPATH, GO, GOMOBILE variables in hello/build.gradle
-and import this project in Android Studio.
+Run
+
+$ gomobile bind -o app/hello.aar golang.org/x/mobile/example/bind/hello
+
+and import this project in Android Studio. If you prefer the command
+line, use gradle to build directly.
+
+Note that you need to run gomobile bind again every time you make a
+change to Go code.
diff --git a/example/bind/android/app/build.gradle b/example/bind/android/app/build.gradle
index 75d8e66..832cb27 100644
--- a/example/bind/android/app/build.gradle
+++ b/example/bind/android/app/build.gradle
@@ -5,6 +5,12 @@
*/
apply plugin: 'com.android.application'
+repositories {
+ flatDir {
+ dirs '.'
+ }
+}
+
android {
compileSdkVersion 27
@@ -23,7 +29,6 @@
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:22.1.1'
- implementation project(':hello')
+ implementation (name:'hello', ext:'aar')
}
diff --git a/example/bind/android/hello/build.gradle b/example/bind/android/hello/build.gradle
deleted file mode 100644
index 5fbb3cb..0000000
--- a/example/bind/android/hello/build.gradle
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright 2015 The Go Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-
-plugins {
- id "org.golang.mobile.bind" version "0.2.13"
-}
-
-gobind {
- /* The Go package path; must be under one of the GOPATH elements or
- a relative to the current directory (e.g. ../../hello) */
- pkg = "golang.org/x/mobile/example/bind/hello"
-
- /* GOPATH where the Go package is; check `go env` */
- // GOPATH = "/YOUR/GOPATH"
-
- /* Absolute path to the go binary */
- // GO = "/PATH/TO/GO"
-
- /* Optionally, set the absolute path to the gomobile binary if the
- /* gomobile binary is not located in the GOPATH's bin directory. */
- // GOMOBILE = "/PATH/TO/GOMOBILE"
-}
diff --git a/example/bind/android/settings.gradle b/example/bind/android/settings.gradle
index f37694c..718aac6 100644
--- a/example/bind/android/settings.gradle
+++ b/example/bind/android/settings.gradle
@@ -2,4 +2,4 @@
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
-include ':app', ':hello'
+include ':app'
diff --git a/example/ivy/android/README b/example/ivy/android/README
new file mode 100644
index 0000000..683864a
--- /dev/null
+++ b/example/ivy/android/README
@@ -0,0 +1,8 @@
+Ivy Android app
+
+Run
+
+$ gomobile bind -o app/ivy.aar robpike.io/ivy/mobile
+
+and import this project in Android Studio. If you prefer the command
+line, use gradle to build directly.
diff --git a/example/ivy/android/app/build.gradle b/example/ivy/android/app/build.gradle
index f0ac8cb..559b34c 100644
--- a/example/ivy/android/app/build.gradle
+++ b/example/ivy/android/app/build.gradle
@@ -1,5 +1,11 @@
apply plugin: 'com.android.application'
+repositories {
+ flatDir {
+ dirs '.'
+ }
+}
+
android {
compileSdkVersion 23
defaultConfig {
@@ -20,7 +26,6 @@
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:23.3.0'
- implementation project(':ivy')
+ implementation (name:'ivy', ext:'aar')
}
diff --git a/example/ivy/android/app/src/main/java/org/golang/ivy/Help.java b/example/ivy/android/app/src/main/java/org/golang/ivy/Help.java
index 518c4fa..b17f854 100644
--- a/example/ivy/android/app/src/main/java/org/golang/ivy/Help.java
+++ b/example/ivy/android/app/src/main/java/org/golang/ivy/Help.java
@@ -15,7 +15,7 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;
-import org.golang.mobile.Mobile;
+import mobile.Mobile;
/*
* Displays the help message for Ivy.
diff --git a/example/ivy/android/app/src/main/java/org/golang/ivy/MainActivity.java b/example/ivy/android/app/src/main/java/org/golang/ivy/MainActivity.java
index dbb3d4a..04008a2 100644
--- a/example/ivy/android/app/src/main/java/org/golang/ivy/MainActivity.java
+++ b/example/ivy/android/app/src/main/java/org/golang/ivy/MainActivity.java
@@ -32,7 +32,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
-import org.golang.mobile.Mobile;
+import mobile.Mobile;
/*
* Main activity that consists of an edit view to accept the expression
diff --git a/example/ivy/android/build.gradle b/example/ivy/android/build.gradle
index f77fe35..8110722 100644
--- a/example/ivy/android/build.gradle
+++ b/example/ivy/android/build.gradle
@@ -6,7 +6,7 @@
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.0.1'
+ classpath 'com.android.tools.build:gradle:3.1.0'
}
}
diff --git a/example/ivy/android/ivy/build.gradle b/example/ivy/android/ivy/build.gradle
deleted file mode 100644
index e8234b9..0000000
--- a/example/ivy/android/ivy/build.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-// 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-plugins {
- id "org.golang.mobile.bind" version "0.2.13"
-}
-
-gobind {
- pkg = "robpike.io/ivy/mobile"
-
- // -javapkg flag puts the generated java class into the specified package.
- GOMOBILEFLAGS="-javapkg=org.golang"
-
- /* Set the following variable(s):
-
- GOPATH: where the Go package is; check `go env`. This is required.
- ex) GOPATH="/my/go/path".
-
- GO: if the Go binary is not in the usual place, specify
- the absolute path to the go binary.
- */
-}
diff --git a/example/ivy/android/settings.gradle b/example/ivy/android/settings.gradle
index 8759a03..e7b4def 100644
--- a/example/ivy/android/settings.gradle
+++ b/example/ivy/android/settings.gradle
@@ -1 +1 @@
-include ':app', ':ivy'
+include ':app'
diff --git a/misc/androidstudio/.gitignore b/misc/androidstudio/.gitignore
deleted file mode 100644
index 0b62693..0000000
--- a/misc/androidstudio/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.gradle
-/build
diff --git a/misc/androidstudio/README.md b/misc/androidstudio/README.md
deleted file mode 100644
index 385120b..0000000
--- a/misc/androidstudio/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-gobindPlugin invokes gomobile bind command on the specified package.
-
-# Usage
-
-build.gradle:
-<pre>
-plugins {
- id "org.golang.mobile.bind" version "0.2.13"
-}
-
-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"
-}
-</pre>
-
-For details:
-https://plugins.gradle.org/plugin/org.golang.mobile.bind
-
-# TODO
-
-* Find the stale aar file (how?)
diff --git a/misc/androidstudio/build.gradle b/misc/androidstudio/build.gradle
deleted file mode 100644
index 950dfc3..0000000
--- a/misc/androidstudio/build.gradle
+++ /dev/null
@@ -1,44 +0,0 @@
-apply plugin: 'groovy'
-
-// Many android users still use JDK7.
-sourceCompatibility = '1.7'
-targetCompatibility = '1.7'
-
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath "com.gradle.publish:plugin-publish-plugin:0.9.8"
- }
-}
-
-apply plugin: "com.gradle.plugin-publish"
-repositories {
- jcenter()
-}
-
-dependencies {
- compile gradleApi()
- compile localGroovy()
-
- testCompile 'junit:junit:4.11'
-}
-
-version = '0.2.13'
-
-pluginBundle {
- website = 'https://golang.org/x/mobile'
- vcsUrl = 'https://golang.org/x/mobile'
- description = 'Plugin for gomobile projects'
-
- plugins {
- gobindPlugin {
- id = 'org.golang.mobile.bind'
- displayName = 'gomobile bind plugin'
- tags = ['golang', 'gomobile', 'gobind']
- }
- }
-}
diff --git a/misc/androidstudio/settings.gradle b/misc/androidstudio/settings.gradle
deleted file mode 100644
index b1def88..0000000
--- a/misc/androidstudio/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'gobindPlugin'
diff --git a/misc/androidstudio/src/main/groovy/org/golang/mobile/AARPublishArtifact.java b/misc/androidstudio/src/main/groovy/org/golang/mobile/AARPublishArtifact.java
deleted file mode 100644
index a9e60fc..0000000
--- a/misc/androidstudio/src/main/groovy/org/golang/mobile/AARPublishArtifact.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Copyright 2015 The Go Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-
-package org.golang.mobile;
-
-import org.golang.mobile.OutputFileTask;
-
-import org.gradle.api.Task;
-import org.gradle.api.artifacts.PublishArtifact;
-import org.gradle.api.tasks.TaskDependency;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Set;
-
-/**
- * custom implementation of PublishArtifact for published AAR
- */
-public class AARPublishArtifact implements PublishArtifact {
-
- private final String name;
- private final String classifier;
- private final OutputFileTask task;
- private final TaskDependency taskDependency;
-
- private static final class DefaultTaskDependency implements TaskDependency {
-
- private final Set<Task> tasks;
-
- DefaultTaskDependency(Task task) {
- this.tasks = Collections.singleton(task);
- }
-
- @Override
- public Set<? extends Task> getDependencies(Task task) {
- return tasks;
- }
- }
-
- public AARPublishArtifact(
- String name,
- String classifier,
- OutputFileTask task) {
- this.name = name;
- this.classifier = classifier;
- this.task = task;
- this.taskDependency = new DefaultTaskDependency((Task) task);
- }
-
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getExtension() {
- return "aar";
- }
-
- @Override
- public String getType() {
- return "aar";
- }
-
- @Override
- public String getClassifier() {
- return classifier;
- }
-
- @Override
- public File getFile() {
- return task.getOutputFile();
- }
-
- @Override
- public Date getDate() {
- return null;
- }
-
- @Override
- public TaskDependency getBuildDependencies() {
- return taskDependency;
- }
-}
diff --git a/misc/androidstudio/src/main/groovy/org/golang/mobile/GobindPlugin.groovy b/misc/androidstudio/src/main/groovy/org/golang/mobile/GobindPlugin.groovy
deleted file mode 100644
index 50ca103..0000000
--- a/misc/androidstudio/src/main/groovy/org/golang/mobile/GobindPlugin.groovy
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright 2015 The Go Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-
-package org.golang.mobile
-
-import org.gradle.api.DefaultTask
-import org.gradle.api.GradleException
-import org.gradle.api.Project
-import org.gradle.api.Plugin
-import org.gradle.api.Task
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.tasks.InputDirectory
-import org.gradle.api.tasks.Optional
-import org.gradle.api.tasks.OutputFile
-import org.gradle.api.tasks.OutputDirectory
-import org.gradle.api.tasks.TaskAction
-import org.gradle.api.tasks.compile.JavaCompile
-
-import org.golang.mobile.OutputFileTask
-import org.golang.mobile.AARPublishArtifact
-
-/*
- * GobindPlugin configures the default project that builds .AAR file
- * from a go package, using gomobile bind command.
- * For gomobile bind command, see https://golang.org/x/mobile/cmd/gomobile
- *
- * If the project has the android or android library plugin loaded, GobindPlugin
- * hooks into the android build lifecycle in two steps. First, the Java classes are
- * generated and registered with the android plugin. Then, when the databinding
- * classes and the R classes are generated and compiled, the GobindPlugin generates
- * the JNI libraries. By splitting the binding in two steps, the Android databinding
- * machinery can resolve Go classes, and Go code can access the resulting databinding
- * classes as well as the R resource classes.
- */
-class GobindPlugin implements Plugin<Project> {
- void apply(Project project) {
- project.extensions.create('gobind', GobindExtension)
- // If the android or android library plugin is loaded, integrate
- // directly with the android build cycle
- if (project.plugins.hasPlugin("android") ||
- project.plugins.hasPlugin("com.android.application")) {
- project.android.applicationVariants.all { variant ->
- handleVariant(project, variant)
- }
- return
- }
- if (project.plugins.hasPlugin("android-library") ||
- project.plugins.hasPlugin("com.android.library")) {
- project.android.libraryVariants.all { variant ->
- handleVariant(project, variant)
- }
- return
- }
-
- // Library mode: generate and declare the .aar file for parent
- // projects to include.
- project.configurations.create("default")
-
- Task gomobileTask = project.tasks.create("gobind", GomobileTask)
- gomobileTask.outputFile = project.file(project.name+".aar")
- project.artifacts.add("default", new AARPublishArtifact(
- 'mylib',
- null,
- gomobileTask))
- }
-
- private static void handleVariant(Project project, def variant) {
- File outputDir = project.file("$project.buildDir/generated/source/gobind/$variant.dirName")
- // First, generate the Java classes with the gobind tool.
- Task bindTask = project.tasks.create("gobind${variant.name.capitalize()}", GobindTask)
- bindTask.outputDir = outputDir
- bindTask.javaCompile = variant.javaCompile
- bindTask.bootClasspath = variant.javaCompile.options.bootClasspath
- // TODO: Detect when updating the Java classes is redundant.
- bindTask.outputs.upToDateWhen { false }
- variant.registerJavaGeneratingTask(bindTask, new File(outputDir, "java"))
- // Then, generate the JNI libraries with the gomobile tool.
- Task libTask = project.tasks.create("gomobile${variant.name.capitalize()}", GomobileTask)
- libTask.bootClasspath = variant.javaCompile.options.bootClasspath
- libTask.javaCompile = variant.javaCompile
- // Dump the JNI libraries in the known project jniLibs directory.
- // TODO: Use a directory below build for the libraries instead. Adding a jni directory to the jniLibs
- // property of android.sourceSets only works, but only if the directory changes every build.
- libTask.libsDir = project.file("src/main/jniLibs")
- // TODO: Detect when building the existing JNI libraries is redundant.
- libTask.outputs.upToDateWhen { false }
- libTask.dependsOn(bindTask)
- // Ensure gomobile bind completes before depending on its output.
- variant.javaCompile.dependsOn(libTask)
- }
-}
-
-class BindTask extends DefaultTask {
- String bootClasspath
-
- def run(String cmd, String cmdPath, List<String> cmdArgs) {
- def pkg = project.gobind.pkg.trim()
- def gopath = (project.gobind.GOPATH ?: System.getenv("GOPATH"))?.trim()
- if (!pkg || !gopath) {
- throw new GradleException('gobind.pkg and gobind.GOPATH must be set')
- }
-
- def paths = (gopath.split(File.pathSeparator).collect{ "$it/bin" } +
- System.getenv("PATH").split(File.pathSeparator)).flatten()
- // Default installation path of go distribution.
- if (isWindows()) {
- paths = paths + "c:\\Go\\bin"
- } else {
- paths = paths + "/usr/local/go/bin"
- }
-
- def exe = (cmdPath ?: findExecutable(cmd, paths))?.trim()
- def gobin = (project.gobind.GO ?: findExecutable("go", paths))?.trim()
- def gomobileFlags = project.gobind.GOMOBILEFLAGS?.trim()
-
- if (!exe || !gobin) {
- throw new GradleException('failed to find ${cmd}/go tools. Set gobind.GOBIND, gobind.GOMOBILE, and gobind.GO')
- }
-
- paths = [findDir(exe), findDir(gobin), paths].flatten()
-
- def androidHome = ""
- try {
- Properties properties = new Properties()
- properties.load(project.rootProject.file('local.properties').newDataInputStream())
- androidHome = properties.getProperty('sdk.dir')
- } catch (all) {
- logger.info("failed to load local.properties.")
- }
- if (!androidHome?.trim()) {
- // fallback to ANDROID_HOME
- androidHome = System.getenv("ANDROID_HOME")
- }
-
- project.exec {
- executable(exe)
-
- if (bootClasspath)
- cmdArgs.addAll(["-bootclasspath", bootClasspath])
- if (gomobileFlags) {
- cmdArgs.addAll(gomobileFlags.split(" "))
- }
- cmdArgs.addAll(pkg.split(" "))
-
- args(cmdArgs)
- if (!androidHome?.trim()) {
- throw new GradleException('Neither sdk.dir or ANDROID_HOME is set')
- }
- environment("GOPATH", gopath)
- environment("GOOS", "android")
- environment("PATH", paths.join(File.pathSeparator))
- environment("ANDROID_HOME", androidHome)
- }
- }
-
- def isWindows() {
- return System.getProperty("os.name").startsWith("Windows")
- }
-
- def findExecutable(String name, ArrayList<String> paths) {
- if (isWindows() && !name.endsWith(".exe")) {
- name = name + ".exe"
- }
- for (p in paths) {
- def f = new File(p + File.separator + name)
- if (f.exists()) {
- return p + File.separator + name
- }
- }
- throw new GradleException('binary ' + name + ' is not found in $PATH (' + paths + ')')
- }
-
- def findDir(String binpath) {
- if (!binpath) {
- return ""
- }
-
- def f = new File(binpath)
- return f.getParentFile().getAbsolutePath();
- }
-}
-
-class GobindTask extends BindTask {
- @OutputDirectory
- File outputDir
-
- JavaCompile javaCompile
-
- @TaskAction
- def gobind() {
- run("gobind", project.gobind.GOBIND, ["-lang", "java", "-classpath", javaCompile.classpath.join(File.pathSeparator), "-outdir", outputDir.getAbsolutePath()])
- }
-}
-
-class GomobileTask extends BindTask implements OutputFileTask {
- @Optional
- @OutputFile
- File outputFile
-
- @Optional
- @OutputDirectory
- File libsDir
-
- JavaCompile javaCompile
-
- @TaskAction
- def gomobile() {
- if (outputFile == null) {
- outputFile = File.createTempFile("gobind-", ".aar")
- }
- def cmd = ["bind"]
- // Add the generated R and databinding classes to the classpath.
- if (javaCompile) {
- def classpath = project.files(javaCompile.classpath, javaCompile.destinationDir)
- cmd << "-classpath"
- cmd << classpath.join(File.pathSeparator)
- }
- cmd << "-o"
- cmd << outputFile.getAbsolutePath()
- cmd << "-target"
- def goarch = project.gobind.GOARCH?.trim()
- if (goarch) {
- cmd = cmd+goarch.split(" ").collect{ 'android/'+it }.join(",")
- } else {
- cmd << "android"
- }
- run("gomobile", project.gobind.GOMOBILE, cmd)
- // If libsDir is set, unpack (only) the JNI libraries to it.
- if (libsDir != null) {
- project.delete project.fileTree(dir: libsDir, include: '*/libgojni.so')
- def zipFile = new java.util.zip.ZipFile(outputFile)
- zipFile.entries().findAll { !it.directory && it.name.startsWith("jni/") }.each {
- def libFile = new File(libsDir, it.name.substring(4))
- libFile.parentFile.mkdirs()
- zipFile.getInputStream(it).withStream {
- libFile.append(it)
- }
- }
- outputFile.delete()
- }
- }
-}
-
-class GobindExtension {
- // Package to bind. Separate multiple packages with spaces. (required)
- def String pkg = ""
-
- // GOPATH: necessary for gomobile tool. (required)
- def String GOPATH = System.getenv("GOPATH")
-
- // GOARCH: (List of) GOARCH to include.
- def String GOARCH = ""
-
- // GO: path to go tool. (can omit if 'go' is in the paths visible by Android Studio)
- def String GO = ""
-
- // GOMOBILE: path to gomobile binary. (can omit if 'gomobile' is under GOPATH)
- def String GOMOBILE = ""
-
- // GOBIND: path to gobind binary. (can omit if 'gobind' is under GOPATH)
- def String GOBIND = ""
-
- // GOMOBILEFLAGS: extra flags to be passed to gomobile command. (optional)
- def String GOMOBILEFLAGS = ""
-}
diff --git a/misc/androidstudio/src/main/groovy/org/golang/mobile/OutputFileTask.java b/misc/androidstudio/src/main/groovy/org/golang/mobile/OutputFileTask.java
deleted file mode 100644
index 6c41f6c..0000000
--- a/misc/androidstudio/src/main/groovy/org/golang/mobile/OutputFileTask.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * Copyright 2015 The Go Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-
-package org.golang.mobile;
-
-import java.io.File;
-
-/**
- * A task that outputs a file.
- */
-public interface OutputFileTask {
- File getOutputFile();
-}
diff --git a/misc/androidstudio/src/main/resources/META-INF/gradle-plugins/org.golang.mobile.bind.canary.properties b/misc/androidstudio/src/main/resources/META-INF/gradle-plugins/org.golang.mobile.bind.canary.properties
deleted file mode 100644
index edc8043..0000000
--- a/misc/androidstudio/src/main/resources/META-INF/gradle-plugins/org.golang.mobile.bind.canary.properties
+++ /dev/null
@@ -1 +0,0 @@
-implementation-class=org.golang.mobile.GobindPlugin
diff --git a/misc/androidstudio/src/main/resources/META-INF/gradle-plugins/org.golang.mobile.bind.properties b/misc/androidstudio/src/main/resources/META-INF/gradle-plugins/org.golang.mobile.bind.properties
deleted file mode 100644
index edc8043..0000000
--- a/misc/androidstudio/src/main/resources/META-INF/gradle-plugins/org.golang.mobile.bind.properties
+++ /dev/null
@@ -1 +0,0 @@
-implementation-class=org.golang.mobile.GobindPlugin
diff --git a/misc/androidstudio/src/test/groovy/org/golang/mobile/GobindPluginTest.groovy b/misc/androidstudio/src/test/groovy/org/golang/mobile/GobindPluginTest.groovy
deleted file mode 100644
index 5985d48..0000000
--- a/misc/androidstudio/src/test/groovy/org/golang/mobile/GobindPluginTest.groovy
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright 2015 The Go Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-
-package org.golang.mobile
-
-import org.junit.Test
-import org.gradle.testfixtures.ProjectBuilder
-import org.gradle.api.Project
-import static org.junit.Assert.*
-
-class GobindPluginTest {
- @Test
- public void gobindPluginAddsGobindTaskToProject() {
- Project project = ProjectBuilder.builder().build()
- project.apply plugin: 'org.golang.mobile.bind'
-
- assertTrue(project.tasks.gobind instanceof GomobileTask)
- }
-}
diff --git a/misc/androidstudio/src/test/groovy/org/golang/mobile/GobindTaskTest.groovy b/misc/androidstudio/src/test/groovy/org/golang/mobile/GobindTaskTest.groovy
deleted file mode 100644
index 0492fd5..0000000
--- a/misc/androidstudio/src/test/groovy/org/golang/mobile/GobindTaskTest.groovy
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Copyright 2015 The Go Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-
-package org.golang.mobile
-
-import org.junit.Test
-import org.gradle.testfixtures.ProjectBuilder
-import org.gradle.api.Project
-import static org.junit.Assert.*
-
-class GobindTaskTest {
- @Test
- public void canAddTaskToProject() {
- Project project = ProjectBuilder.builder().build()
- def task = project.task('gobind', type: GobindTask)
- assertTrue(task instanceof GobindTask)
- }
-}