aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2017-08-28 17:44:44 -0700
committerJakob Odersky <jakob@odersky.com>2017-08-28 17:44:44 -0700
commit1f31f01f9c0ad73a70a9e3dd23c9d8ec27fd1792 (patch)
tree4d5efe0694cd5ce1f84bc418f65283ebea088e0d
parent4fc072c49c3b896ab31c1db29228033a98f9a838 (diff)
downloadsbt-jni-1f31f01f9c0ad73a70a9e3dd23c9d8ec27fd1792.tar.gz
sbt-jni-1f31f01f9c0ad73a70a9e3dd23c9d8ec27fd1792.tar.bz2
sbt-jni-1f31f01f9c0ad73a70a9e3dd23c9d8ec27fd1792.zip
Upgrade to sbt 1.0.1v1.3.0
-rw-r--r--README.md2
-rw-r--r--plugin/src/main/scala/ch/jodersky/sbt/jni/plugins/RunDependencyFixPlugin.scala44
-rw-r--r--plugin/src/sbt-test/sbt-jni/multiclasses/build.sbt4
-rw-r--r--plugin/src/sbt-test/sbt-jni/simple/build.sbt3
-rw-r--r--plugin/src/sbt-test/sbt-jni/simple/project/build.properties2
-rw-r--r--project/build.properties2
6 files changed, 5 insertions, 52 deletions
diff --git a/README.md b/README.md
index 0e1cd68..791ef37 100644
--- a/README.md
+++ b/README.md
@@ -138,7 +138,7 @@ This plugin packages native libraries produced by JniNative in a way that they c
```scala
lazy val core = project in file("myproject-core"). // regular scala code with @native methods
- dependsOnRun(native) // remove this if `core` is a library, leave choice to end-user
+ dependsOn(native % Runtime) // remove this if `core` is a library, leave choice to end-user
lazy val native = project in file("myproject-native"). // native code and build script
enablePlugin(JniNative) // JniNative needs to be explicitly enabled
diff --git a/plugin/src/main/scala/ch/jodersky/sbt/jni/plugins/RunDependencyFixPlugin.scala b/plugin/src/main/scala/ch/jodersky/sbt/jni/plugins/RunDependencyFixPlugin.scala
deleted file mode 100644
index 3c4f92c..0000000
--- a/plugin/src/main/scala/ch/jodersky/sbt/jni/plugins/RunDependencyFixPlugin.scala
+++ /dev/null
@@ -1,44 +0,0 @@
-package ch.jodersky.sbt.jni.plugins
-
-import sbt._
-import sbt.Keys._
-import java.io.File
-
-/** Adds the extension method `dependsOnRun` to projects, to work around an sbt
- * bug. */
-object RunDependencyFixPlugin extends AutoPlugin {
-
- override def requires = plugins.CorePlugin
- override def trigger = allRequirements
-
- object autoImport {
-
- val runClasspath = taskKey[Seq[sbt.internal.util.Attributed[File]]]("Classpath used in run task")
-
- def dependsOnRunSettings(project: Project) = Seq(
- runClasspath in Compile ++= (runClasspath in Compile in project).value,
- run := {
- Defaults.runTask(
- runClasspath in Compile,
- mainClass in Compile in run,
- runner in run
- ).evaluated
- }
- )
-
- implicit class RichProject(project: Project) {
- @deprecated("Workaround for https://github.com/sbt/sbt/issues/3425. " +
- "Use `dependsOn(<project> % Runtime)` when fixed.", "1.3.0")
- def dependsOnRun(other: Project) = {
- project.settings(dependsOnRunSettings(other): _*)
- }
- }
-
- }
- import autoImport._
-
- override def projectSettings = Seq(
- runClasspath in Compile := (fullClasspath in Compile).value
- )
-
-}
diff --git a/plugin/src/sbt-test/sbt-jni/multiclasses/build.sbt b/plugin/src/sbt-test/sbt-jni/multiclasses/build.sbt
index c1352d9..d12a711 100644
--- a/plugin/src/sbt-test/sbt-jni/multiclasses/build.sbt
+++ b/plugin/src/sbt-test/sbt-jni/multiclasses/build.sbt
@@ -5,9 +5,7 @@ lazy val root = (project in file(".")).
lazy val core = (project in file("core")).
dependsOn(native1 % Runtime).
- dependsOn(native2 % Runtime).
- dependsOnRun(native1).
- dependsOnRun(native2)
+ dependsOn(native2 % Runtime)
lazy val native1 = (project in file("native1")).
settings(sourceDirectory in nativeCompile := sourceDirectory.value).
diff --git a/plugin/src/sbt-test/sbt-jni/simple/build.sbt b/plugin/src/sbt-test/sbt-jni/simple/build.sbt
index b3d441a..cd490b0 100644
--- a/plugin/src/sbt-test/sbt-jni/simple/build.sbt
+++ b/plugin/src/sbt-test/sbt-jni/simple/build.sbt
@@ -6,8 +6,7 @@ lazy val root = (project in file(".")).
lazy val core = (project in file("core")).
settings(libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0" % "test").
settings(target in javah := (sourceDirectory in nativeCompile in native).value / "include").
- dependsOn(native % Runtime).
- dependsOnRun(native)
+ dependsOn(native % Runtime)
lazy val native = (project in file("native")).
settings(sourceDirectory in nativeCompile := sourceDirectory.value).
diff --git a/plugin/src/sbt-test/sbt-jni/simple/project/build.properties b/plugin/src/sbt-test/sbt-jni/simple/project/build.properties
index 94005e5..7b6213b 100644
--- a/plugin/src/sbt-test/sbt-jni/simple/project/build.properties
+++ b/plugin/src/sbt-test/sbt-jni/simple/project/build.properties
@@ -1 +1 @@
-sbt.version=1.0.0
+sbt.version=1.0.1
diff --git a/project/build.properties b/project/build.properties
index 94005e5..7b6213b 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=1.0.0
+sbt.version=1.0.1