1
1
scalaVersion := " 2.10.3-RC1"
2
2
3
- organization := " org.typesafe.async" // TODO new org name under scala-lang.
4
-
5
3
// Uncomment to test with a locally built copy of Scala.
6
4
// scalaHome := Some(file("/code/scala2/build/pack"))
7
5
6
+
7
+ organization := " org.scala-lang.modules.async" // TODO new org name under scala-lang.
8
+
8
9
name := " scala-async"
9
10
10
11
version := " 1.0.0-SNAPSHOT"
@@ -45,10 +46,26 @@ libraryDependencies ++= (scalaHome.value match {
45
46
46
47
scalacOptions += " -P:continuations:enable"
47
48
48
- scalacOptions ++= Seq (" -deprecation" , " -unchecked" , " -Xlint" , " -feature" )
49
+ scalacOptions in compile ++= Seq (" -optimize " , " -deprecation" , " -unchecked" , " -Xlint" , " -feature" )
49
50
50
51
scalacOptions in Test ++= Seq (" -Yrangepos" )
51
52
53
+ // Generate $name.properties to store our version as well as the scala version used to build
54
+ resourceGenerators in Compile <+= Def .task {
55
+ val props = new java.util.Properties
56
+ props.put(" version.number" , version.value)
57
+ props.put(" scala.version.number" , scalaVersion.value)
58
+ props.put(" scala.binary.version.number" , scalaBinaryVersion.value)
59
+ val file = (resourceManaged in Compile ).value / s " ${name.value}.properties "
60
+ IO .write(props, null , file)
61
+ Seq (file)
62
+ }
63
+
64
+ mappings in (Compile , packageBin) += {
65
+ (baseDirectory.value / s " ${name.value}.properties " ) -> s " ${name.value}.properties "
66
+ }
67
+
68
+
52
69
description := " An asynchronous programming facility for Scala, in the spirit of C# await/async"
53
70
54
71
homepage := Some (url(" http://github.com/scala/async" ))
@@ -60,6 +77,22 @@ licenses +=("Scala license", url("https://github.com/scala/async/blob/master/LIC
60
77
// Uncomment to disable test compilation.
61
78
// (sources in Test) ~= ((xs: Seq[File]) => xs.filter(f => Seq("TreeInterrogation", "package").exists(f.name.contains)))
62
79
80
+ // maven publishing
81
+ publishTo := {
82
+ val nexus = " https://oss.sonatype.org/"
83
+ val repo = if (version.value.trim.endsWith(" SNAPSHOT" ))
84
+ " snapshots" at nexus + " content/repositories/snapshots"
85
+ else
86
+ " releases" at nexus + " service/local/staging/deploy/maven2"
87
+ Some (repo)
88
+ }
89
+
90
+ publishMavenStyle := true
91
+
92
+ publishArtifact in Test := false
93
+
94
+ pomIncludeRepository := { _ => false }
95
+
63
96
pomExtra := (
64
97
<developers >
65
98
<developer >
0 commit comments