|
1 | | -import VersionKeys.{snapshotScalaBinaryVersion,deriveBinaryVersion} |
| 1 | +scalaModuleSettings |
2 | 2 |
|
3 | | -organization := "org.scala-lang.modules" |
| 3 | +name := "scala-xml" |
4 | 4 |
|
5 | | -name := "scala-xml" |
| 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 | | - "org.scala-lang" % "scala-compiler" % scalaVersion.value % "test", // used in CompilerErrors test |
23 | | - "junit" % "junit" % "4.11" % "test", |
24 | | - "com.novocode" % "junit-interface" % "0.10" % "test") |
25 | | - |
26 | | - |
27 | | -// don't use for doc scope, scaladoc warnings are not to be reckoned with |
28 | | -// TODO: turn on for nightlies, but don't enable for PR validation... "-Xfatal-warnings" |
29 | | -scalacOptions in compile ++= Seq("-optimize", "-feature", "-deprecation", "-unchecked", "-Xlint") |
30 | | - |
31 | | -// Generate $name.properties to store our version as well as the scala version used to build |
32 | | -resourceGenerators in Compile <+= Def.task { |
33 | | - val props = new java.util.Properties |
34 | | - props.put("version.number", version.value) |
35 | | - props.put("scala.version.number", scalaVersion.value) |
36 | | - props.put("scala.binary.version.number", scalaBinaryVersion.value) |
37 | | - val file = (resourceManaged in Compile).value / s"${name.value}.properties" |
38 | | - IO.write(props, null, file) |
39 | | - Seq(file) |
40 | | -} |
41 | | - |
42 | | -mappings in (Compile, packageBin) += { |
43 | | - (baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties" |
44 | | -} |
45 | | - |
46 | | - |
47 | | -// maven publishing |
48 | | -publishTo := { |
49 | | - val nexus = "https://oss.sonatype.org/" |
50 | | - if (version.value.trim.endsWith("SNAPSHOT")) |
51 | | - Some("snapshots" at nexus + "content/repositories/snapshots") |
52 | | - else |
53 | | - Some("releases" at nexus + "service/local/staging/deploy/maven2") |
54 | | -} |
55 | | - |
56 | | -credentials += Credentials(Path.userHome / ".ivy2" / ".credentials") |
57 | | - |
58 | | -publishMavenStyle := true |
59 | | - |
60 | | -publishArtifact in Test := false |
61 | | - |
62 | | -pomIncludeRepository := { _ => false } |
63 | | - |
64 | | -pomExtra := ( |
65 | | - <url>http://www.scala-lang.org/</url> |
66 | | - <inceptionYear>2002</inceptionYear> |
67 | | - <licenses> |
68 | | - <license> |
69 | | - <distribution>repo</distribution> |
70 | | - <name>BSD 3-Clause</name> |
71 | | - <url>https://github.com/scala/{name.value}/blob/master/LICENSE.md</url> |
72 | | - </license> |
73 | | - </licenses> |
74 | | - <scm> |
75 | | - <connection>scm:git:git://github.com/scala/{name.value}.git</connection> |
76 | | - <url>https://github.com/scala/{name.value}</url> |
77 | | - </scm> |
78 | | - <issueManagement> |
79 | | - <system>JIRA</system> |
80 | | - <url>https://issues.scala-lang.org/</url> |
81 | | - </issueManagement> |
82 | | - <developers> |
83 | | - <developer> |
84 | | - <id>epfl</id> |
85 | | - <name>EPFL</name> |
86 | | - </developer> |
87 | | - <developer> |
88 | | - <id>Typesafe</id> |
89 | | - <name>Typesafe, Inc.</name> |
90 | | - </developer> |
91 | | - </developers> |
92 | | -) |
93 | | - |
94 | | -osgiSettings |
95 | | - |
96 | | -val osgiVersion = version(_.replace('-', '.')) |
97 | | - |
98 | | -OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" |
99 | | - |
100 | | -OsgiKeys.bundleVersion := osgiVersion.value |
| 11 | +// important!! must come here (why?) |
| 12 | +scalaModuleOsgiSettings |
101 | 13 |
|
102 | 14 | OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}") |
103 | 15 |
|
104 | | -// Sources should also have a nice MANIFEST file |
105 | | -packageOptions in packageSrc := Seq(Package.ManifestAttributes( |
106 | | - ("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"), |
107 | | - ("Bundle-Name", s"${name.value} sources"), |
108 | | - ("Bundle-Version", osgiVersion.value), |
109 | | - ("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""") |
110 | | - )) |
| 16 | +libraryDependencies += "junit" % "junit" % "4.11" % "test" |
111 | 17 |
|
| 18 | +libraryDependencies += "com.novocode" % "junit-interface" % "0.10" % "test" |
112 | 19 |
|
113 | | -// TODO: mima |
114 | | -// import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings |
115 | | -// import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact |
116 | | -// previousArtifact := Some(organization.value %% name.value % binaryReferenceVersion.value) |
| 20 | +// used in CompilerErrors test |
| 21 | +libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value % "test" |
0 commit comments