aboutsummaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-08-23 19:23:18 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-08-23 19:23:18 +0200
commitee114b06cf530e9b37f28eaefaf86a6bb99e59ed (patch)
tree9356818551dce496049dae5c48a7c3dde0632808 /build.sbt
parent0cb09c24985a063ea150c967485ac379ae4e231a (diff)
downloadscala-async-ee114b06cf530e9b37f28eaefaf86a6bb99e59ed.tar.gz
scala-async-ee114b06cf530e9b37f28eaefaf86a6bb99e59ed.tar.bz2
scala-async-ee114b06cf530e9b37f28eaefaf86a6bb99e59ed.zip
Polishing the build
- move to maven group org.scala-lang.modules / scala-async - add config to publish to sonatype OSS - generate a scala-async.properties files (ala the scala-parser-combinators build)
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt39
1 files changed, 36 insertions, 3 deletions
diff --git a/build.sbt b/build.sbt
index a013bb2..b485264 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,10 +1,11 @@
scalaVersion := "2.10.3-RC1"
-organization := "org.typesafe.async" // TODO new org name under scala-lang.
-
// Uncomment to test with a locally built copy of Scala.
// scalaHome := Some(file("/code/scala2/build/pack"))
+
+organization := "org.scala-lang.modules.async" // TODO new org name under scala-lang.
+
name := "scala-async"
version := "1.0.0-SNAPSHOT"
@@ -45,10 +46,26 @@ libraryDependencies ++= (scalaHome.value match {
scalacOptions += "-P:continuations:enable"
-scalacOptions ++= Seq("-deprecation", "-unchecked", "-Xlint", "-feature")
+scalacOptions in compile ++= Seq("-optimize", "-deprecation", "-unchecked", "-Xlint", "-feature")
scalacOptions in Test ++= Seq("-Yrangepos")
+// 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)
+}
+
+mappings in (Compile, packageBin) += {
+ (baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties"
+}
+
+
description := "An asynchronous programming facility for Scala, in the spirit of C# await/async"
homepage := Some(url("http://github.com/scala/async"))
@@ -60,6 +77,22 @@ licenses +=("Scala license", url("https://github.com/scala/async/blob/master/LIC
// Uncomment to disable test compilation.
// (sources in Test) ~= ((xs: Seq[File]) => xs.filter(f => Seq("TreeInterrogation", "package").exists(f.name.contains)))
+// maven publishing
+publishTo := {
+ val nexus = "https://oss.sonatype.org/"
+ val repo = if (version.value.trim.endsWith("SNAPSHOT"))
+ "snapshots" at nexus + "content/repositories/snapshots"
+ else
+ "releases" at nexus + "service/local/staging/deploy/maven2"
+ Some(repo)
+}
+
+publishMavenStyle := true
+
+publishArtifact in Test := false
+
+pomIncludeRepository := { _ => false }
+
pomExtra := (
<developers>
<developer>