Skip to content

Commit a6abc3f

Browse files
committed
modules will use GitHub Actions, not Travis-CI
1 parent b63d6fc commit a6abc3f

File tree

3 files changed

+8
-25
lines changed

3 files changed

+8
-25
lines changed

README.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ This is an sbt 1.x plugin for building Scala modules.
44

55
## What modules use it?
66

7-
* [travis-test](https://github.com/lrytz/travis-test) (example project for testing this plugin and tag-driven releases)
87
* [scala-async](https://github.com/scala/scala-async)
98
* [scala-collection-compat](https://github.com/scala/scala-collection-compat)
109
* [scala-collection-contrib](https://github.com/scala/scala-collection-contrib)
@@ -25,19 +24,17 @@ A major feature of the plugin is automated tag-based publishing using
2524
sbt-ci-release. A release is made by pushing a tag to GitHub.
2625

2726
The plugin also brings in
28-
- sbt-travisci to set the `scalaVersion` and `crossScalaVersions`
2927
- sbt-dynver to set the `version` based on the git history
28+
- sbt-version-policy to check the versioning policy using MiMa
3029
- sbt-header to automate copyright header maintenance
31-
- sbt-mima-plugin to maintain binary compatibility
3230
- sbt-osgi, if enabled with `scalaModuleOsgiSettings`
33-
- sbt-version-policy to check the versioning policy
3431

3532
## Usage
3633

3734
Add the plugin to the `project/plugins.sbt` file:
3835

3936
```
40-
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.3")
37+
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % <version>)
4138
```
4239

4340
Then, in your `build.sbt` add:
@@ -61,18 +58,16 @@ OsgiKeys.exportPackage := Seq(s"<exported package>;version=${version.value}")
6158
// Other settings
6259
```
6360

64-
Scala versions are defined in `.travis.yml`.
65-
66-
Cross-building with Scala.js and Scala Native is possible, see travis-test, scala-xml or scala-parser-combinators for example.
61+
Cross-building with Scala.js and Scala Native is possible. See scala-xml or scala-parser-combinators for examples.
6762

6863
These additional settings are enabled by `scalaModuleSettings`:
69-
- `scalacOptions in (Compile, compile) ++= Seq("-feature", "-deprecation", "-unchecked", "-Xlint")`
64+
- `Compile / compile / scalacOptions ++= Seq("-feature", "-deprecation", "-unchecked", "-Xlint")`
7065
- A `projectName.properties` file is generated and packaged
71-
- `fork in Test := true` to work around some classpath clashes with scala-xml
66+
- `Test / fork := true` to work around some classpath clashes with scala-xml
7267
- POM metadata
7368

7469
The following settings are also available:
75-
- `enableOptimizer` adds `-opt-inline-from:<sources>` or `-opt:l:project` or `-optimize` to `scalacOptions in (Compile, compile)`,
70+
- `enableOptimizer` adds `-opt-inline-from:<sources>` or `-opt:l:project` or `-optimize` to `Compile / compile / scalacOptions`,
7671
depending on the Scala version
7772

7873
## Set up tag-based publishing
@@ -90,7 +85,7 @@ The instructions here are a summary of the readme in https://github.com/olafurpg
9085
- Copy the public key to a key server
9186
- `gpg --armor --export $LONG_ID`
9287
- http://keyserver.ubuntu.com:11371/
93-
- Open the Settings panel on your project's travis, define four secret env vars
88+
- In your repo's Actions settings, define four secret env vars
9489
- `PGP_PASSPHRASE` the passphrase you chose above
9590
- `PGP_SECRET` the secret key in base64
9691
- macOS: `gpg --armor --export-secret-keys $LONG_ID | base64`

build.sbt

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ developers := List(Developer("", "", "", url("https://scala-lang.org"))
99

1010
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.6")
1111
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
12-
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0") // set scalaVersion and crossScalaVersions
1312
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") // set version, scmInfo, publishing settings
14-
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "2.0.0")
13+
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "2.0.0") // brings in MiMa

src/main/scala/ScalaModulePlugin.scala

-11
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,6 @@ object ScalaModulePlugin extends AutoPlugin {
3737
override def projectSettings: Seq[Setting[_]] = Seq(
3838
// The staging profile is called `org.scala-lang`, the default is `org.scala-lang.modules`
3939
sonatypeProfileName := "org.scala-lang",
40-
41-
// The staging repository name. The default is `[sbt-sonatype] name version`. We include the
42-
// Scala/Scala.js/Scala Native versions and the travis job number to avoid conflicts when
43-
// running the travis jobs. Example: collection-compat has a two 2.12.x jobs, one for the
44-
// compat library, one for the migration rules, and both were writing to the same staging repo.
45-
sonatypeSessionName := {
46-
val sjs = Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).map(v => s" (js $v)").getOrElse("")
47-
val native = Option(System.getenv("SCALANATIVE_VERSION")).filter(_.nonEmpty).map(v => s" (native $v)").getOrElse("")
48-
val jobNr = Option(System.getenv("TRAVIS_JOB_NUMBER")).filter(_.nonEmpty).map(v => s" (travis #$v)").getOrElse("")
49-
s"${sonatypeSessionName.value} Scala ${scalaVersion.value}$sjs$native$jobNr"
50-
},
5140
)
5241

5342
// Global settings

0 commit comments

Comments
 (0)