1
1
# Scala modules sbt plugin
2
2
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.
5
4
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.
10
35
11
36
## Usage
12
37
13
38
Add the plugin to the ` project/plugins.sbt ` file:
14
39
15
40
```
16
- addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1 .0.14 ")
41
+ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2 .0.0 ")
17
42
```
18
43
19
44
Then, in your ` build.sbt ` add:
@@ -22,7 +47,7 @@ Then, in your `build.sbt` add:
22
47
import ScalaModulePlugin._
23
48
24
49
scalaModuleSettings // 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)
26
51
27
52
name := "<module name>"
28
53
repoName := "<GitHub repo name>" // the repo under github.com/scala/, only required if different from name
@@ -35,13 +60,10 @@ scalaVersionsByJvm in ThisBuild := {
35
60
val v211 = "2.11.12"
36
61
val v212 = "2.12.8"
37
62
val v213 = "2.13.0-M5"
38
-
39
63
// Map[JvmMajorVersion, List[(ScalaVersion, UseForPublishing)]]
40
64
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))
45
67
}
46
68
47
69
mimaPreviousVersion := Some("1.0.0") // enables MiMa (`None` by default, which disables it)
0 commit comments