Skip to content

Commit 4528f0d

Browse files
committed
backport new publishing scripts based on sbt-ci-release
1 parent d709919 commit 4528f0d

13 files changed

+106
-284
lines changed

.travis.yml

+18-32
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,34 @@
1-
dist: trusty
1+
version: ~> 1.0 # needed for imports
2+
3+
import: scala/scala-dev:travis/default.yml
4+
25
language: scala
3-
jdk:
4-
- oraclejdk8
5-
- openjdk11
66

77
scala:
88
- 2.11.12
9-
- 2.12.8
10-
- 2.13.0
9+
- 2.12.10
10+
- 2.13.1
1111

1212
env:
13-
global:
14-
# PGP_PASSPHRASE
15-
- secure: "SkBtn/6OjEldoikn0MFuyeLT/pau27kwKSDYTVQeJ4BKDzdWLwLE5Q3RukLGttIfNdhOvRoocpQSW9GkZfibTHmwrRnAokucfZCqTsKbwoOp1xIoOh5GrrVrB6gcP7WBTKinqFdBgSvLOrP7GviImz4ZuB9wq1r+mToGG4pDrXc="
16-
# SONA_USER
17-
- secure: "JSv/Er6q1XtTpRH1bpU63YBf7ufwg0vW+Kv/udQBtr8YX/P3gRYC1x6hW4uwftaKMYh7wXDkfNy51SRpH3kUptdJvjPUifVElyPiYlsumetmD+rZJmxX6agx+U5pdjIXPqPoton9MdSVHNTROeTu339bDak0Z+N5ht5wRfjP7F4="
18-
# SONA_PASS
19-
- secure: "OIVtcj7AHZr8Grpf03ZmZsygcADewiYIvSnRwLYCx+5AqOzs39EZ68DsIOxi7wEXVUbVj5RvLXpKzLX3iN+UszLOQRoFPFQyyn+3Y50f8T2aRxdZtInzXn0sCVTj4Hhd/zbKl1W+2Nh3Sqazab7tFoQVzEyYqhcPeiNRMF7h+aY="
20-
matrix:
21-
# The empty SCALAJS_VERSION will only compile for the JVM
22-
- SCALAJS_VERSION=
23-
- SCALAJS_VERSION=0.6.28
24-
- SCALAJS_VERSION=1.0.0
13+
- ADOPTOPENJDK=8 SCALAJS_VERSION=
14+
- ADOPTOPENJDK=8 SCALAJS_VERSION=0.6.32
15+
- ADOPTOPENJDK=8 SCALAJS_VERSION=1.0.0
16+
- ADOPTOPENJDK=11 SCALAJS_VERSION=
2517

2618
matrix:
2719
include:
28-
- env: SCALANATIVE_VERSION=0.3.9
29-
jdk: oraclejdk8
30-
- env: SCALANATIVE_VERSION=0.4.0-M2
31-
jdk: oraclejdk8
20+
- scala: 2.11.12
21+
env: ADOPTOPENJDK=8 SCALANATIVE_VERSION=0.3.9
22+
- scala: 2.11.12
23+
env: ADOPTOPENJDK=8 SCALANATIVE_VERSION=0.4.0-M2
3224

33-
script: admin/build.sh
25+
install:
26+
- git fetch --tags # get all tags for sbt-dynver
27+
28+
script: ./build.sh
3429

3530
notifications:
3631
email:
3732
3833
3934
40-
41-
before_cache:
42-
- find $HOME/.sbt -name "*.lock" | xargs rm
43-
- find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm
44-
cache:
45-
directories:
46-
- $HOME/.ivy2/cache
47-
- $HOME/.sbt/boot
48-
- $HOME/.sbt/launchers

admin/README.md

-72
This file was deleted.

admin/build.sh

-62
This file was deleted.

admin/encryptEnvVars.sh

-11
This file was deleted.

admin/genKeyPair.sh

-41
This file was deleted.

admin/gpg.sbt

-1
This file was deleted.

admin/publish-settings.sbt

-9
This file was deleted.

admin/pubring.asc

-18
This file was deleted.

admin/secring.asc.enc

-1.84 KB
Binary file not shown.

build.sbt

+25-29
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
import ScalaModulePlugin._
2-
import sbtcrossproject.crossProject
1+
import sbtcrossproject.CrossPlugin.autoImport.crossProject
32

4-
crossScalaVersions in ThisBuild := List("2.12.8", "2.11.12", "2.13.0")
5-
6-
lazy val root = project.in(file("."))
7-
.aggregate(`scala-parser-combinatorsJS`, `scala-parser-combinatorsJVM`, `scala-parser-combinatorsNative`)
8-
.settings(disablePublishing)
9-
10-
lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, NativePlatform).
11-
withoutSuffixFor(JVMPlatform).in(file(".")).
12-
settings(scalaModuleSettings: _*).
13-
jvmSettings(scalaModuleSettingsJVM).
14-
settings(
3+
lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatform)
4+
.withoutSuffixFor(JVMPlatform).in(file("."))
5+
.settings(ScalaModulePlugin.scalaModuleSettings)
6+
.jvmSettings(ScalaModulePlugin.scalaModuleSettingsJVM)
7+
.settings(
158
name := "scala-parser-combinators",
16-
version := "1.1.2-SNAPSHOT",
17-
mimaPreviousVersion := Some("1.1.0").filter(_ => System.getenv("SCALAJS_VERSION") != "1.0.0"),
9+
10+
scalaModuleMimaPreviousVersion := Some("1.1.0").filter(_ => System.getenv("SCALAJS_VERSION") != "1.0.0"),
11+
mimaBinaryIssueFilters ++= {
12+
import com.typesafe.tools.mima.core._
13+
import com.typesafe.tools.mima.core.ProblemFilters._
14+
Seq(
15+
exclude[IncompatibleSignatureProblem]("*")
16+
)
17+
},
1818

1919
apiMappings += (scalaInstance.value.libraryJar ->
20-
url(s"https://www.scala-lang.org/api/${scalaVersion.value}/")),
20+
url(s"https://www.scala-lang.org/api/${scalaVersion.value}/")),
2121

2222
scalacOptions in (Compile, doc) ++= Seq(
2323
"-diagrams",
@@ -38,18 +38,18 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
3838
}
3939
}
4040
}
41-
).
42-
jvmSettings(
41+
)
42+
.jvmSettings(
4343
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}"),
44-
libraryDependencies += "junit" % "junit" % "4.12" % "test",
45-
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
46-
).
47-
jsSettings(
44+
libraryDependencies += "junit" % "junit" % "4.13" % Test,
45+
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test
46+
)
47+
.jsSettings(
4848
// Scala.js cannot run forked tests
4949
fork in Test := false
50-
).
51-
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)).
52-
nativeSettings(
50+
)
51+
.jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin))
52+
.nativeSettings(
5353
skip in compile := System.getProperty("java.version").startsWith("1.6") || !scalaVersion.value.startsWith("2.11"),
5454
test := {},
5555
libraryDependencies := {
@@ -58,7 +58,3 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
5858
else libraryDependencies.value
5959
}
6060
)
61-
62-
lazy val `scala-parser-combinatorsJVM` = `scala-parser-combinators`.jvm
63-
lazy val `scala-parser-combinatorsJS` = `scala-parser-combinators`.js
64-
lazy val `scala-parser-combinatorsNative` = `scala-parser-combinators`.native

0 commit comments

Comments
 (0)