Skip to content

Commit fe4f57d

Browse files
committed
move to sbt 1. don't support or publish for 0.13 anymore
fixes #32
1 parent 4230120 commit fe4f57d

File tree

6 files changed

+53
-73
lines changed

6 files changed

+53
-73
lines changed

.sbtrepos

-8
This file was deleted.

.travis.yml

+7-22
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
language: scala
22

3-
# Needed for openjdk6
4-
dist: precise
5-
sudo: required
6-
addons:
7-
hosts:
8-
- localhost
9-
hostname: localhost.local
10-
113
jdk:
12-
- openjdk6
13-
14-
# cache stuff, hopefully shortening build times
15-
cache:
16-
directories:
17-
- $HOME/.ivy2
18-
- $HOME/.sbt/boot
19-
- $HOME/.sbt/launchers
4+
- oraclejdk8
205

216
script:
22-
# work around https://github.com/travis-ci/travis-ci/issues/9713
23-
- if [[ $JAVA_HOME = *java-6* ]]; then jdk_switcher use openjdk6; fi
24-
- java -version
25-
# also, Maven Central and Bintray are unreachable over HTTPS
26-
- if [[ $JAVA_HOME = *java-6* ]]; then SBTOPTS="-Dsbt.override.build.repos=true -Dsbt.repository.config=./.sbtrepos"; fi
27-
- sbt $SBTOPTS test
7+
- sbt test
288

299
before_cache:
3010
- find $HOME/.sbt -name "*.lock" | xargs rm
3111
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
12+
cache:
13+
directories:
14+
- $HOME/.ivy2
15+
- $HOME/.sbt/boot
16+
- $HOME/.sbt/launchers
3217

3318
notifications:
3419
email:

README.md

+35-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
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

1338
Add 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

1944
Then, in your `build.sbt` add:
@@ -22,7 +47,7 @@ Then, in your `build.sbt` add:
2247
import ScalaModulePlugin._
2348
2449
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)
2651
2752
name := "<module name>"
2853
repoName := "<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
4769
mimaPreviousVersion := Some("1.0.0") // enables MiMa (`None` by default, which disables it)

build.sbt

+9-25
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
1-
git.baseVersion := "1.0.0"
2-
3-
versionWithGit
4-
5-
name := "sbt-scala-module"
6-
7-
organization := "org.scala-lang.modules"
8-
91
sbtPlugin := true
102

11-
// sbtVersion in Global := "0.13.1"
12-
13-
// scalaVersion in Global := "2.10.3"
14-
15-
// publishTo := Some(if (version.value.trim.endsWith("SNAPSHOT")) Classpaths.sbtPluginSnapshots else Classpaths.sbtPluginReleases)
16-
17-
publishMavenStyle := false
18-
19-
resolvers += Classpaths.sbtPluginReleases
20-
21-
licenses := Seq(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))
22-
23-
bintrayRepository := "sbt-plugins"
3+
git.baseVersion := "1.0.0"
4+
versionWithGit
245

6+
name := "sbt-scala-module"
7+
organization := "org.scala-lang.modules"
8+
licenses := Seq(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))
9+
resolvers += Classpaths.sbtPluginReleases
10+
bintrayRepository := "sbt-plugins"
2511
bintrayOrganization := None
12+
publishMavenStyle := false
2613

27-
// Version 0.9.1 requires Java 8 (on 6 we get NoClassDefFoundError: java/util/function/Predicate).
28-
// We still run our plugin builds for 2.11 on Java 6, so we cannot upgrade.
29-
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.8.0")
30-
14+
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4")
3115
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.3.0")

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.18
1+
sbt.version=1.2.8

project/plugins.sbt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
// careful upgrading this; we can't move to a version that doesn't
2-
// work on Java 6
3-
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.6.4")
4-
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
52
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")

0 commit comments

Comments
 (0)