Skip to content

Commit b8dbefc

Browse files
committed
Merge pull request #12 from adriaanm/master
Switch to scala-module-plugin, sbt 0.13.1
2 parents 2fb034e + dcc5401 commit b8dbefc

File tree

4 files changed

+11
-119
lines changed

4 files changed

+11
-119
lines changed

build.sbt

Lines changed: 9 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,18 @@
1-
import VersionKeys.{snapshotScalaBinaryVersion,deriveBinaryVersion}
1+
scalaModuleSettings
22

3-
organization := "org.scala-lang.modules"
3+
name := "scala-parser-combinators"
44

5-
name := "scala-parser-combinators"
5+
version := "1.0.0-SNAPSHOT"
66

7-
version := "1.0.0-SNAPSHOT"
7+
scalaVersion := "2.11.0-M8"
88

9-
scalaVersion := "2.11.0-M7"
9+
snapshotScalaBinaryVersion := "2.11.0-M8"
1010

11-
snapshotScalaBinaryVersion := "2.11.0-M7"
12-
13-
// DOUBLETHINK YOUR WAY OUT OF EDITING BELOW (THERE IS NO BELOW)
14-
15-
scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value)
16-
17-
// to allow compiling against snapshot versions of Scala
18-
resolvers += Resolver.sonatypeRepo("snapshots")
19-
20-
21-
libraryDependencies ++= Seq(
22-
"junit" % "junit" % "4.11" % "test",
23-
"com.novocode" % "junit-interface" % "0.10" % "test")
24-
25-
// don't use for doc scope, scaladoc warnings are not to be reckoned with
26-
// TODO: turn on for nightlies, but don't enable for PR validation... "-Xfatal-warnings"
27-
scalacOptions in compile ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint")
28-
29-
30-
// Generate $name.properties to store our version as well as the scala version used to build
31-
resourceGenerators in Compile <+= Def.task {
32-
val props = new java.util.Properties
33-
props.put("version.number", version.value)
34-
props.put("scala.version.number", scalaVersion.value)
35-
props.put("scala.binary.version.number", scalaBinaryVersion.value)
36-
val file = (resourceManaged in Compile).value / s"${name.value}.properties"
37-
IO.write(props, null, file)
38-
Seq(file)
39-
}
40-
41-
mappings in (Compile, packageBin) += {
42-
(baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties"
43-
}
44-
45-
46-
// maven publishing
47-
publishTo := {
48-
val nexus = "https://oss.sonatype.org/"
49-
if (version.value.trim.endsWith("SNAPSHOT"))
50-
Some("snapshots" at nexus + "content/repositories/snapshots")
51-
else
52-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
53-
}
54-
55-
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
56-
57-
publishMavenStyle := true
58-
59-
publishArtifact in Test := false
60-
61-
pomIncludeRepository := { _ => false }
62-
63-
pomExtra := (
64-
<url>http://www.scala-lang.org/</url>
65-
<inceptionYear>2002</inceptionYear>
66-
<licenses>
67-
<license>
68-
<distribution>repo</distribution>
69-
<name>BSD 3-Clause</name>
70-
<url>https://github.com/scala/{name.value}/blob/master/LICENSE.md</url>
71-
</license>
72-
</licenses>
73-
<scm>
74-
<connection>scm:git:git://github.com/scala/{name.value}.git</connection>
75-
<url>https://github.com/scala/{name.value}</url>
76-
</scm>
77-
<issueManagement>
78-
<system>JIRA</system>
79-
<url>https://issues.scala-lang.org/</url>
80-
</issueManagement>
81-
<developers>
82-
<developer>
83-
<id>epfl</id>
84-
<name>EPFL</name>
85-
</developer>
86-
<developer>
87-
<id>Typesafe</id>
88-
<name>Typesafe, Inc.</name>
89-
</developer>
90-
</developers>
91-
)
92-
93-
osgiSettings
94-
95-
val osgiVersion = version(_.replace('-', '.'))
96-
97-
OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}"
98-
99-
OsgiKeys.bundleVersion := osgiVersion.value
11+
// important!! must come here (why?)
12+
scalaModuleOsgiSettings
10013

10114
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}")
10215

103-
// Sources should also have a nice MANIFEST file
104-
packageOptions in packageSrc := Seq(Package.ManifestAttributes(
105-
("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"),
106-
("Bundle-Name", s"${name.value} sources"),
107-
("Bundle-Version", osgiVersion.value),
108-
("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""")
109-
))
110-
16+
libraryDependencies += "junit" % "junit" % "4.11" % "test"
11117

112-
// TODO: mima
113-
// import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
114-
// import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
115-
// previousArtifact := Some(organization.value %% name.value % binaryReferenceVersion.value)
18+
libraryDependencies += "com.novocode" % "junit-interface" % "0.10" % "test"

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.0
1+
sbt.version=0.13.1

project/keys.scala

Lines changed: 0 additions & 11 deletions
This file was deleted.

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0")
1+
addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.1")

0 commit comments

Comments
 (0)