11# Scala modules sbt plugin
22
3- This is an sbt plugin for building Scala modules (scala-xml,
4- scala-parser-combinators, and so on).
3+ This is an sbt plugin for building Scala modules.
54
6- The major benefit of the plugin is to provide automated tag-based
7- publishing. A release is made by pushing a tag to GitHub. Travis
8- then stages artifacts on Sonatype. Pressing "Close" and "Release" in
9- the Sonatype web UI will then send the artifacts to Maven Central.
5+ ## What modules use it?
6+
7+ * [ scala-async] ( https://github.com/scala/scala-async )
8+ * [ scala-collection-compat] ( https://github.com/scala/scala-collection-compat )
9+ * [ scala-java8-compat] ( https://github.com/scala/scala-java8-compat )
10+ * [ scala-parallel-collections] ( https://github.com/scala/scala-parallel-collections )
11+ * [ scala-parser-combinators] ( https://github.com/scala/scala-parser-combinators )
12+ * [ scala-partest] ( https://github.com/scala/scala-partest )
13+ * [ scala-swing] ( https://github.com/scala/scala-swing )
14+ * [ scala-xml] ( https://github.com/scala/scala-xml )
15+
16+ ## Why this plugin?
17+
18+ Having a shared plugin reduces duplication between the above
19+ repositories. Reducing duplication makes maintenance easier and
20+ helps ensure consistency.
21+
22+ A major feature of the plugin is automated tag-based publishing. A
23+ release is made by pushing a tag to GitHub. Travis-CI then stages
24+ artifacts on Sonatype. Pressing "Close" and "Release" in the Sonatype
25+ web UI will then send the artifacts to Maven Central.
26+
27+ ## Branches and versions
28+
29+ The main development branch is 2.x; only sbt 1 is supported there.
30+
31+ sbt 0.13 support is on the legacy 1.x branch.
32+
33+ Scala modules are encouraged to move to sbt 1 on their primary
34+ development branches as soon as reasonably possible.
1035
1136## Usage
1237
1338Add the plugin to the ` project/plugins.sbt ` file:
1439
1540```
16- addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1 .0.14 ")
41+ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2 .0.0 ")
1742```
1843
1944Then, in your ` build.sbt ` add:
@@ -22,7 +47,7 @@ Then, in your `build.sbt` add:
2247import ScalaModulePlugin._
2348
2449scalaModuleSettings // in a multi-project build, you might want to apply these settings only to the
25- // main project (example: scala-parallel-collections)
50+ // main project (see e.g. scala-parallel-collections)
2651
2752name := "<module name>"
2853repoName := "<GitHub repo name>" // the repo under github.com/scala/, only required if different from name
@@ -35,13 +60,10 @@ scalaVersionsByJvm in ThisBuild := {
3560 val v211 = "2.11.12"
3661 val v212 = "2.12.8"
3762 val v213 = "2.13.0-M5"
38-
3963 // Map[JvmMajorVersion, List[(ScalaVersion, UseForPublishing)]]
4064 Map(
41- 6 -> List(v211 -> true),
42- 7 -> List(v211 -> false),
43- 8 -> List(v212 -> true, v213 -> true, v211 -> false),
44- 9 -> List(v212, v213, v211).map(_ -> false))
65+ 8 -> List(v211 -> true, v212 -> true, v213 -> true),
66+ 9 -> List(v211, v212, v213).map(_ -> false))
4567}
4668
4769mimaPreviousVersion := Some("1.0.0") // enables MiMa (`None` by default, which disables it)
0 commit comments