Skip to content

Commit 39f303c

Browse files
committed
Update to sbt-scala-module 1.0.12
Add osgi settings only to the `JVM` project. In the JS project they caused the resulting jar to be empty. Fixes #119 Adds MiMa checking to the JS jar. Minor cleanups in the build definition.
1 parent 2cb29f8 commit 39f303c

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

build.sbt

+10-22
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ lazy val root = project.in(file("."))
1919

2020
lazy val `scala-parser-combinators` = crossProject.in(file(".")).
2121
settings(scalaModuleSettings: _*).
22+
jvmSettings(scalaModuleSettingsJVM).
2223
settings(
23-
name := "scala-parser-combinators-root",
24+
repoName := "scala-parser-combinators",
25+
version := "1.0.7-SNAPSHOT",
26+
mimaPreviousVersion := Some("1.0.5"),
27+
2428
apiMappings += (scalaInstance.value.libraryJar ->
2529
url(s"https://www.scala-lang.org/api/${scalaVersion.value}/")),
30+
2631
scalacOptions in (Compile, doc) ++= Seq(
2732
"-diagrams",
2833
"-doc-source-url",
@@ -36,32 +41,15 @@ lazy val `scala-parser-combinators` = crossProject.in(file(".")).
3641
)
3742
).
3843
jvmSettings(
39-
// Mima uses the name of the jvm project in the artifactId
40-
// when resolving previous versions (so no "-jvm" project)
41-
name := "scala-parser-combinators"
42-
).
43-
jsSettings(
44-
name := "scala-parser-combinators-js"
45-
).
46-
settings(
47-
moduleName := "scala-parser-combinators",
48-
version := "1.0.7-SNAPSHOT"
49-
).
50-
jvmSettings(
51-
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}")
44+
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}"),
45+
libraryDependencies += "junit" % "junit" % "4.12" % "test",
46+
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
5247
).
5348
jsSettings(
5449
// Scala.js cannot run forked tests
5550
fork in Test := false
5651
).
57-
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)).
58-
jvmSettings(
59-
libraryDependencies += "junit" % "junit" % "4.12" % "test",
60-
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
61-
).
62-
jvmSettings(
63-
mimaPreviousVersion := Some("1.0.4")
64-
)
52+
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin))
6553

6654
lazy val `scala-parser-combinatorsJVM` = `scala-parser-combinators`.jvm
6755
lazy val `scala-parser-combinatorsJS` = `scala-parser-combinators`.js

project/plugins.sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.8")
1+
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.12")
22

3-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.16")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.18")

0 commit comments

Comments
 (0)