Skip to content

Commit

Permalink
Merge branch 'main' into update/sbt-github-actions-0.14.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joroKr21 authored Feb 10, 2022
2 parents f03ea15 + 2137969 commit 5de8870
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ addCommandAlias("examples", ";project examplesJVM")
addCommandAlias("validate", ";root;validateJVM;validateJS;validateNative")
addCommandAlias("validateJVM", ";coreJVM/compile;coreJVM/mimaReportBinaryIssues;coreJVM/test;examplesJVM/compile;examplesJVM/test;coreJVM/doc")
addCommandAlias("validateJS", ";coreJS/compile;coreJS/mimaReportBinaryIssues;coreJS/test;examplesJS/compile;examplesJS/test;coreJS/doc")
addCommandAlias("validateNative", ";coreNative/compile;nativeTest/run;examplesNative/compile")
addCommandAlias("validateNative", ";coreNative/compile;coreNative/test;nativeTest/run;examplesNative/compile;examplesNative/test;coreNative/doc")
addCommandAlias("runAll", ";examplesJVM/runAll")

def scalacOptionsAll(pluginJar: File) = List(
Expand Down Expand Up @@ -121,6 +121,21 @@ def configureJUnit(crossProject: CrossProject) = {
libraryDependencies +=
"com.github.sbt" % "junit-interface" % "0.13.3" % "test"
)
.nativeSettings(
libraryDependencies += "org.scala-native" %%% "junit-runtime" % nativeVersion,
addCompilerPlugin("org.scala-native" % "junit-plugin" % nativeVersion cross CrossVersion.full),
pomPostProcess := { node =>
import scala.xml._
import scala.xml.transform._
new RuleTransformer(new RewriteRule{
override def transform(n: Node) =
if (n.label == "dependency" && (n \ "artifactId").text.startsWith("junit-runtime_native"))
NodeSeq.Empty
else
n
}).transform(node)(0)
},
)
}

lazy val commonJsSettings = Seq(
Expand Down Expand Up @@ -180,7 +195,6 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform).crossType(
Compile / packageDoc / publishArtifact := false,
packageDoc / publishArtifact := false,
Compile / doc / sources := Nil,
Test / sources := Nil
)

lazy val coreJVM = core.jvm
Expand Down Expand Up @@ -224,7 +238,6 @@ lazy val examples = crossProject(JSPlatform, JVMPlatform, NativePlatform).crossT
.jvmSettings(commonJvmSettings:_*)
.nativeSettings(
Compile / sources ~= (_.filterNot(_.getName == "sexp.scala")),
Test / sources := Nil
)

lazy val examplesJVM = examples.jvm
Expand Down

0 comments on commit 5de8870

Please sign in to comment.