diff options
author | Jakob Odersky <jakob@odersky.com> | 2016-05-02 05:19:07 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2016-05-11 11:17:09 -0700 |
commit | 791cb363b77332e3abdf4039102dfcdb863ce6c3 (patch) | |
tree | 09ff5d807a1407abedade57b692204ceac3f3280 /project/Build.scala | |
parent | 49563ee13599b0cb1add27b24446677a13b1f563 (diff) | |
download | sbt-jni-791cb363b77332e3abdf4039102dfcdb863ce6c3.tar.gz sbt-jni-791cb363b77332e3abdf4039102dfcdb863ce6c3.tar.bz2 sbt-jni-791cb363b77332e3abdf4039102dfcdb863ce6c3.zip |
Use macro annotation to load native library
This also removes the need for third projects to depend on a "loader library".
Diffstat (limited to 'project/Build.scala')
-rw-r--r-- | project/Build.scala | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/project/Build.scala b/project/Build.scala deleted file mode 100644 index 377730d..0000000 --- a/project/Build.scala +++ /dev/null @@ -1,64 +0,0 @@ -import sbt._ -import sbt.Keys._ - -import bintray.BintrayPlugin.autoImport._ -import sbtdoge.CrossPerProjectPlugin - -object JniBuild extends Build { - - val scalaVersions = List("2.11.8", "2.12.0-M4", "2.12.0-M3", "2.10.6") - - val commonSettings = Seq( - version := "0.4.5-SNAPSHOT", - organization := "ch.jodersky", - licenses := Seq(("BSD New", url("http://opensource.org/licenses/BSD-3-Clause"))), - scalacOptions ++= Seq("-deprecation", "-feature") - ) - - lazy val root = Project( - id = "root", - base = file("."), - aggregate = Seq( - library, plugin - ), - settings = Seq( - publish := {}, - publishLocal := {}, - publishTo := Some(Resolver.file("Unused transient repository", target.value / "unusedrepo")) // make sbt-pgp happy - ) - ).enablePlugins(CrossPerProjectPlugin) - - lazy val library = Project( - id = "jni-library", - base = file("jni-library"), - settings = commonSettings ++ Seq( - scalaVersion := scalaVersions.head, - crossScalaVersions := scalaVersions - ) - ) - - lazy val plugin = Project( - id = "sbt-jni", - base = file("jni-plugin"), - dependencies = Seq(library), - settings = commonSettings ++ Seq( - sbtPlugin := true, - sourceGenerators in Compile += Def.task{ - val src = s"""|package ch.jodersky.sbt.jni - | - |private object Version { - | final val PluginVersion = "${version.value}" - |} - |""".stripMargin - val file = sourceManaged.value / "ch" / "jodersky" / "sbt" / "jni" / "Version.scala" - IO.write(file, src) - Seq(file) - }.taskValue, - libraryDependencies += "org.ow2.asm" % "asm" % "5.0.4", - publishMavenStyle := false, - bintrayRepository := "sbt-plugins", - bintrayOrganization in bintray := None - ) - ) - -} |