diff --git a/.github/workflows/compile_test.yml b/.github/workflows/compile_test.yml index 90c5fe4..ceeb1ba 100644 --- a/.github/workflows/compile_test.yml +++ b/.github/workflows/compile_test.yml @@ -17,7 +17,7 @@ jobs: platform: [JVM, JS, Native] env: - PROJECT: core${{ matrix.platform != 'JVM' && matrix.platform || '' }}${{ matrix.scala }} + PROJECT: core${{ matrix.platform }}${{ matrix.scala }} steps: - uses: actions/checkout@v2 diff --git a/build.sbt b/build.sbt index f4d3d71..4522a04 100644 --- a/build.sbt +++ b/build.sbt @@ -32,7 +32,8 @@ val siteSettings = Seq( ) ) -lazy val core = (projectMatrix in file("core")) +lazy val core = + crossProject(JVMPlatform, JSPlatform, NativePlatform) .settings( name := "interim", libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-M10" % Test, @@ -47,9 +48,6 @@ lazy val core = (projectMatrix in file("core")) "docs" ) ) - .jvmPlatform(scalaVersions = Seq("3.3.1")) - .jsPlatform(scalaVersions = Seq("3.3.1")) - .nativePlatform(scalaVersions = Seq("3.3.1")) releaseCrossBuild := true releaseTagComment := s"Release ${(ThisBuild / version).value}" diff --git a/core/src/main/scala/eu/joaocosta/interim/Color.scala b/core/shared/src/main/scala/eu/joaocosta/interim/Color.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/Color.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/Color.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/Font.scala b/core/shared/src/main/scala/eu/joaocosta/interim/Font.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/Font.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/Font.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/InputState.scala b/core/shared/src/main/scala/eu/joaocosta/interim/InputState.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/InputState.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/InputState.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/InterIm.scala b/core/shared/src/main/scala/eu/joaocosta/interim/InterIm.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/InterIm.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/InterIm.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/ItemId.scala b/core/shared/src/main/scala/eu/joaocosta/interim/ItemId.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/ItemId.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/ItemId.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/PanelState.scala b/core/shared/src/main/scala/eu/joaocosta/interim/PanelState.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/PanelState.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/PanelState.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/Rect.scala b/core/shared/src/main/scala/eu/joaocosta/interim/Rect.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/Rect.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/Rect.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/Ref.scala b/core/shared/src/main/scala/eu/joaocosta/interim/Ref.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/Ref.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/Ref.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/RenderOp.scala b/core/shared/src/main/scala/eu/joaocosta/interim/RenderOp.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/RenderOp.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/RenderOp.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/TextLayout.scala b/core/shared/src/main/scala/eu/joaocosta/interim/TextLayout.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/TextLayout.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/TextLayout.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/UiContext.scala b/core/shared/src/main/scala/eu/joaocosta/interim/UiContext.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/UiContext.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/UiContext.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/api/Components.scala b/core/shared/src/main/scala/eu/joaocosta/interim/api/Components.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/api/Components.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/api/Components.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/api/Constants.scala b/core/shared/src/main/scala/eu/joaocosta/interim/api/Constants.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/api/Constants.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/api/Constants.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/api/Layouts.scala b/core/shared/src/main/scala/eu/joaocosta/interim/api/Layouts.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/api/Layouts.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/api/Layouts.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/api/Panels.scala b/core/shared/src/main/scala/eu/joaocosta/interim/api/Panels.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/api/Panels.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/api/Panels.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/api/Primitives.scala b/core/shared/src/main/scala/eu/joaocosta/interim/api/Primitives.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/api/Primitives.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/api/Primitives.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/ButtonSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/ButtonSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/ButtonSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/ButtonSkin.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/CheckboxSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/CheckboxSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/CheckboxSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/CheckboxSkin.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/ColorScheme.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/ColorScheme.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/ColorScheme.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/ColorScheme.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/DefaultSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/DefaultSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/DefaultSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/DefaultSkin.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/HandleSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/HandleSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/HandleSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/HandleSkin.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/SelectSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/SelectSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/SelectSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/SelectSkin.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/SliderSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/SliderSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/SliderSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/SliderSkin.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/TextInputSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/TextInputSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/TextInputSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/TextInputSkin.scala diff --git a/core/src/main/scala/eu/joaocosta/interim/skins/WindowSkin.scala b/core/shared/src/main/scala/eu/joaocosta/interim/skins/WindowSkin.scala similarity index 100% rename from core/src/main/scala/eu/joaocosta/interim/skins/WindowSkin.scala rename to core/shared/src/main/scala/eu/joaocosta/interim/skins/WindowSkin.scala diff --git a/core/src/test/scala/eu/joaocosta/interim/InputStateSpec.scala b/core/shared/src/test/scala/eu/joaocosta/interim/InputStateSpec.scala similarity index 100% rename from core/src/test/scala/eu/joaocosta/interim/InputStateSpec.scala rename to core/shared/src/test/scala/eu/joaocosta/interim/InputStateSpec.scala diff --git a/core/src/test/scala/eu/joaocosta/interim/RectSpec.scala b/core/shared/src/test/scala/eu/joaocosta/interim/RectSpec.scala similarity index 100% rename from core/src/test/scala/eu/joaocosta/interim/RectSpec.scala rename to core/shared/src/test/scala/eu/joaocosta/interim/RectSpec.scala diff --git a/core/src/test/scala/eu/joaocosta/interim/RefSpec.scala b/core/shared/src/test/scala/eu/joaocosta/interim/RefSpec.scala similarity index 100% rename from core/src/test/scala/eu/joaocosta/interim/RefSpec.scala rename to core/shared/src/test/scala/eu/joaocosta/interim/RefSpec.scala diff --git a/core/src/test/scala/eu/joaocosta/interim/UiContextSpec.scala b/core/shared/src/test/scala/eu/joaocosta/interim/UiContextSpec.scala similarity index 100% rename from core/src/test/scala/eu/joaocosta/interim/UiContextSpec.scala rename to core/shared/src/test/scala/eu/joaocosta/interim/UiContextSpec.scala diff --git a/core/src/test/scala/eu/joaocosta/interim/api/LayoutsSpec.scala b/core/shared/src/test/scala/eu/joaocosta/interim/api/LayoutsSpec.scala similarity index 100% rename from core/src/test/scala/eu/joaocosta/interim/api/LayoutsSpec.scala rename to core/shared/src/test/scala/eu/joaocosta/interim/api/LayoutsSpec.scala diff --git a/project/plugins.sbt b/project/plugins.sbt index af97247..c20c357 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,9 @@ -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") -addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.1") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")