Skip to content

Commit f51e897

Browse files
committed
clean up build.sbt, bring it in line with other modules
in particular, I've come to really dislike .withoutSuffixFor(JVMPlatform), it makes the root project and the JVM project too easy to confuse with each other
1 parent 94a66be commit f51e897

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

build.sbt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
import sbtcrossproject.CrossPlugin.autoImport.crossProject
1+
lazy val root = project.in(file("."))
2+
.aggregate(parserCombinatorsJVM, parserCombinatorsJS, parserCombinatorsNative)
3+
.settings(
4+
publish / skip := true,
5+
)
26

37
lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatform)
4-
.withoutSuffixFor(JVMPlatform).in(file("."))
5-
.settings(ScalaModulePlugin.scalaModuleSettings)
6-
.jvmSettings(ScalaModulePlugin.scalaModuleOsgiSettings)
8+
.in(file("."))
79
.settings(
10+
ScalaModulePlugin.scalaModuleSettings,
811
name := "scala-parser-combinators",
9-
scalaModuleMimaPreviousVersion := None,
12+
scalaModuleMimaPreviousVersion := None, // until we publish 1.2.0
1013

1114
apiMappings ++= scalaInstance.value.libraryJars.collect {
1215
case file if file.getName.startsWith("scala-library") && file.getName.endsWith(".jar") =>
@@ -40,6 +43,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor
4043
}
4144
)
4245
.jvmSettings(
46+
ScalaModulePlugin.scalaModuleOsgiSettings,
4347
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}"),
4448
libraryDependencies += "junit" % "junit" % "4.13.1" % Test,
4549
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test
@@ -59,3 +63,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor
5963
else libraryDependencies.value
6064
}
6165
)
66+
67+
lazy val parserCombinatorsJVM = parserCombinators.jvm
68+
lazy val parserCombinatorsJS = parserCombinators.js
69+
lazy val parserCombinatorsNative = parserCombinators.native

0 commit comments

Comments
 (0)