|
1 | | -import VersionKeys.{snapshotScalaBinaryVersion,deriveBinaryVersion} |
| 1 | +scalaModuleSettings |
2 | 2 |
|
3 | | -organization := "org.scala-lang.modules" |
| 3 | +name := "scala-parser-combinators" |
4 | 4 |
|
5 | | -name := "scala-parser-combinators" |
| 5 | +version := "1.0.0-SNAPSHOT" |
6 | 6 |
|
7 | | -version := "1.0.0-SNAPSHOT" |
| 7 | +scalaVersion := "2.11.0-M8" |
8 | 8 |
|
9 | | -scalaVersion := "2.11.0-M7" |
| 9 | +snapshotScalaBinaryVersion := "2.11.0-M8" |
10 | 10 |
|
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 |
100 | 13 |
|
101 | 14 | OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}") |
102 | 15 |
|
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" |
111 | 17 |
|
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" |
0 commit comments