diff --git a/build.sbt b/build.sbt index f92b1949..b9114fe9 100644 --- a/build.sbt +++ b/build.sbt @@ -1,16 +1,14 @@ -import VersionKeys._ +scalaModuleSettings -organization := "org.scala-lang.modules" +name := "scala-swing" -name := "scala-swing" +version := "1.0.0-SNAPSHOT" -version := "1.0.0-SNAPSHOT" +scalaVersion := "2.11.0-M8" -scalaVersion := "2.11.0-M7" - -snapshotScalaBinaryVersion := "2.11.0-M7" +snapshotScalaBinaryVersion := "2.11.0-M8" // important!! must come here (why?) -osgiSettings +scalaModuleOsgiSettings OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") diff --git a/project/build.properties b/project/build.properties index a66ffdc3..638d14ee 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.1-RC5 \ No newline at end of file +sbt.version=0.13.1 \ No newline at end of file diff --git a/project/keys.scala b/project/keys.scala deleted file mode 100644 index bdca0dda..00000000 --- a/project/keys.scala +++ /dev/null @@ -1,11 +0,0 @@ -object VersionKeys { - import sbt.settingKey - - val snapshotScalaBinaryVersion = settingKey[String]("The Scala binary version to use when building against Scala SNAPSHOT.") - - def deriveBinaryVersion(sv: String, snapshotScalaBinaryVersion: String) = sv match { - case snap_211 if snap_211.startsWith("2.11") && - snap_211.contains("-SNAPSHOT") => snapshotScalaBinaryVersion - case sv => sbt.CrossVersion.binaryScalaVersion(sv) - } -} diff --git a/project/plugins.sbt b/project/plugins.sbt index c2f7976c..d59d681b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0") \ No newline at end of file +addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.1") \ No newline at end of file diff --git a/standard.sbt b/standard.sbt deleted file mode 100644 index 55a3fb4f..00000000 --- a/standard.sbt +++ /dev/null @@ -1,83 +0,0 @@ -import VersionKeys._ - -// DOUBLETHINK YOUR WAY OUT OF EDITING BELOW (THERE IS NO BELOW) - -scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value) - -// so we don't have to wait for sonatype to synch to maven central when deploying a new module -resolvers += Resolver.sonatypeRepo("releases") - -// to allow compiling against snapshot versions of Scala -resolvers += Resolver.sonatypeRepo("snapshots") - - -// Generate $name.properties to store our version as well as the scala version used to build -resourceGenerators in Compile <+= Def.task { - val props = new java.util.Properties - props.put("version.number", version.value) - props.put("scala.version.number", scalaVersion.value) - props.put("scala.binary.version.number", scalaBinaryVersion.value) - val file = (resourceManaged in Compile).value / s"${name.value}.properties" - IO.write(props, null, file) - Seq(file) -} - - -// maven publishing -publishTo := { - val nexus = "https://oss.sonatype.org/" - if (version.value.trim.endsWith("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") -} - -publishMavenStyle := true - -publishArtifact in Test := false - -pomIncludeRepository := { _ => false } - -pomExtra := ( - http://www.scala-lang.org/ - 2002 - - - repo - BSD 3-Clause - https://github.com/scala/{name.value}/blob/master/LICENSE.md - - - - scm:git:git://github.com/scala/{name.value}.git - https://github.com/scala/{name.value} - - - JIRA - https://issues.scala-lang.org/ - - - - epfl - EPFL - - - Typesafe - Typesafe, Inc. - - -) - -val osgiVersion = version(_.replace('-', '.')) - -OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" - -OsgiKeys.bundleVersion := osgiVersion.value - -// Sources should also have a nice MANIFEST file -packageOptions in packageSrc := Seq(Package.ManifestAttributes( - ("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"), - ("Bundle-Name", s"${name.value} sources"), - ("Bundle-Version", osgiVersion.value), - ("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""") - )) \ No newline at end of file