forked from scala-js/scala-js-java-logging
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sideeffffect/scala-native-port
- Loading branch information
Showing
20 changed files
with
54 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,26 +12,18 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
scalaversion: ["2.11.12", "2.12.10", "2.13.1"] | ||
scalajsversion: ["1.x", "0.6.x"] | ||
include: | ||
- scalaversion: "2.10.7" | ||
scalajsversion: "0.6.x" | ||
env: | ||
SCALAJS_VERSION: "${{ matrix.scalajsversion == '0.6.x' && '0.6.31' || '' }}" | ||
scalaversion: ["2.12.19", "2.13.14"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v10 | ||
with: | ||
java-version: "[email protected]" | ||
- uses: coursier/cache-action@v5 | ||
- name: Scalastyle | ||
run: sbt "++${{ matrix.scalaversion }}" root/scalastyle testSuiteJVM/scalastyle testSuiteJVM/test:scalastyle testSuiteJS/scalastyle testSuiteJS/test:scalastyle | ||
run: sbt "++${{ matrix.scalaversion }}" root/scalastyle testSuiteJVM/scalastyle testSuiteJVM/test:scalastyle testSuiteNative/scalastyle testSuiteNative/test:scalastyle | ||
- name: Test JVM | ||
run: sbt "++${{ matrix.scalaversion }}" testSuiteJVM/test | ||
- name: Test JS | ||
run: sbt "++${{ matrix.scalaversion }}" testSuiteJS/test | ||
- name: Test JS fullOpt | ||
run: sbt "++${{ matrix.scalaversion }}" 'set scalaJSStage in Global := FullOptStage' testSuiteJS/test | ||
- name: Test Native | ||
run: sbt "++${{ matrix.scalaversion }}" testSuiteNative/test | ||
- name: Test publish | ||
run: sbt "++${{ matrix.scalaversion }}" publishLocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
import sbtcrossproject.crossProject | ||
|
||
crossScalaVersions in ThisBuild := { | ||
val allVersions = Seq("2.12.10", "2.11.12", "2.10.7", "2.13.1") | ||
if (scalaJSVersion.startsWith("0.6.")) | ||
allVersions | ||
else | ||
allVersions.filter(!_.startsWith("2.10.")) | ||
} | ||
crossScalaVersions in ThisBuild := Seq("2.12.19", "2.13.14") | ||
scalaVersion in ThisBuild := (crossScalaVersions in ThisBuild).value.head | ||
|
||
val commonSettings: Seq[Setting[_]] = Seq( | ||
version := "1.0.1-SNAPSHOT", | ||
organization := "org.scala-js", | ||
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"), | ||
organization := "org.scala-native", | ||
scalacOptions ++= Seq("-deprecation", "-feature"), | ||
|
||
homepage := Some(url("http://scala-js.org/")), | ||
homepage := Some(url("http://scala-native.org/")), | ||
licenses += ("BSD New", | ||
url("https://github.com/scala-js/scala-js-java-logging/blob/main/LICENSE")), | ||
url("https://github.com/scala-native/scala-native-java-logging/blob/main/LICENSE")), | ||
scmInfo := Some(ScmInfo( | ||
url("https://github.com/scala-js/scala-js-java-logging"), | ||
"scm:git:[email protected]:scala-js/scala-js-java-logging.git", | ||
Some("scm:git:[email protected]:scala-js/scala-js-java-logging.git"))) | ||
url("https://github.com/scala-native/scala-native-java-logging"), | ||
"scm:git:[email protected]:scala-native/scala-native-java-logging.git", | ||
Some("scm:git:[email protected]:scala-native/scala-native-java-logging.git"))) | ||
) | ||
|
||
lazy val root: Project = project.in(file(".")). | ||
enablePlugins(ScalaJSPlugin). | ||
enablePlugins(ScalaNativePlugin). | ||
settings(commonSettings). | ||
settings( | ||
name := "scalajs-java-logging", | ||
name := "scala-native-java-logging", | ||
|
||
mappings in (Compile, packageBin) ~= { | ||
_.filter(!_._2.endsWith(".class")) | ||
|
@@ -64,17 +58,17 @@ lazy val root: Project = project.in(file(".")). | |
pomIncludeRepository := { _ => false } | ||
) | ||
|
||
lazy val testSuite = crossProject(JSPlatform, JVMPlatform). | ||
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)). | ||
lazy val testSuite = crossProject(NativePlatform, JVMPlatform). | ||
nativeConfigure(_.enablePlugins(ScalaNativeJUnitPlugin)). | ||
settings(commonSettings: _*). | ||
settings( | ||
testOptions += | ||
Tests.Argument(TestFramework("com.novocode.junit.JUnitFramework"), "-v", "-a") | ||
). | ||
jsSettings( | ||
name := "java.logging testSuite on JS" | ||
nativeSettings( | ||
name := "java.logging testSuite on Native" | ||
). | ||
jsConfigure(_.dependsOn(root)). | ||
nativeConfigure(_.dependsOn(root)). | ||
jvmSettings( | ||
name := "java.logging testSuite on JVM", | ||
libraryDependencies += | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.3.3 | ||
sbt.version=1.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
val scalaJSVersion = | ||
Option(System.getenv("SCALAJS_VERSION")).filter(_ != "").getOrElse("1.0.0") | ||
|
||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) | ||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.1") | ||
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.1") | ||
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "0.6.1") | ||
|
||
addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "1.0.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rg/scalajs/testsuite/utils/Platform.scala → ...calanative/testsuite/utils/Platform.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...te/javalib/util/logging/HandlerTest.scala → ...te/javalib/util/logging/HandlerTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...uite/javalib/util/logging/LevelTest.scala → ...uite/javalib/util/logging/LevelTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../javalib/util/logging/LogRecordTest.scala → .../javalib/util/logging/LogRecordTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ite/javalib/util/logging/LoggerTest.scala → ...ite/javalib/util/logging/LoggerTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ib/util/logging/SimpleFormatterTest.scala → ...ib/util/logging/SimpleFormatterTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...alib/util/logging/StreamHandlerTest.scala → ...alib/util/logging/StreamHandlerTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...calajs/testsuite/utils/AssertThrows.scala → ...native/testsuite/utils/AssertThrows.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters