Skip to content

Update to sbt-scala-module 1.0.12 #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ lazy val root = project.in(file("."))

lazy val `scala-parser-combinators` = crossProject.in(file(".")).
settings(scalaModuleSettings: _*).
jvmSettings(scalaModuleSettingsJVM).
settings(
name := "scala-parser-combinators-root",
repoName := "scala-parser-combinators",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh, that was probably a mistake from my part, i think it should stay name. the plugin then sets repoName := name.value, which could be overridden if necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't cause harm because the name is picked up from the project name, so you get

> name
[info] scala-parser-combinatorsJS/*:name
[info] 	scala-parser-combinators
[info] scala-parser-combinatorsJVM/*:name
[info] 	scala-parser-combinators

But we should fix it anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version := "1.0.7-SNAPSHOT",
mimaPreviousVersion := Some("1.0.5"),

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

scalacOptions in (Compile, doc) ++= Seq(
"-diagrams",
"-doc-source-url",
Expand All @@ -36,32 +41,15 @@ lazy val `scala-parser-combinators` = crossProject.in(file(".")).
)
).
jvmSettings(
// Mima uses the name of the jvm project in the artifactId
// when resolving previous versions (so no "-jvm" project)
name := "scala-parser-combinators"
).
jsSettings(
name := "scala-parser-combinators-js"
).
settings(
moduleName := "scala-parser-combinators",
version := "1.0.7-SNAPSHOT"
).
jvmSettings(
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}")
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}"),
libraryDependencies += "junit" % "junit" % "4.12" % "test",
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
).
jsSettings(
// Scala.js cannot run forked tests
fork in Test := false
).
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)).
jvmSettings(
libraryDependencies += "junit" % "junit" % "4.12" % "test",
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
).
jvmSettings(
mimaPreviousVersion := Some("1.0.4")
)
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin))

lazy val `scala-parser-combinatorsJVM` = `scala-parser-combinators`.jvm
lazy val `scala-parser-combinatorsJS` = `scala-parser-combinators`.js
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.8")
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.12")

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