浏览代码

Bumped version to be compatible with SBT 1.6.

Made any changes necessary to keep version compatibilities.

Removed Scala crossbuild versions from common settings.
Plugin shouldn't be crossbuilt.
Thomas Flucke 2 年之前
父节点
当前提交
d2bf9d2579

+ 4 - 3
build.sbt

@@ -20,7 +20,6 @@ def commonSettings = Seq(
     "-unchecked",
     "-feature"
   ),
-  crossScalaVersions := Seq("2.12.11", "2.12.10")
 )
 
 /****** The Actual Plugin ******/
@@ -52,10 +51,11 @@ lazy val library = crossProject(JSPlatform, JVMPlatform)
   .settings(
     name := "rest-rpc",
     version := s"0.3.2$VersionSuffix",
-    crossScalaVersions ++= Seq("2.13.7", "2.13.3")
+    crossScalaVersions ++= Seq("3.0.0-M3", "2.13.7", "2.13.3")
   )
   .jvmSettings(
-    libraryDependencies += "com.typesafe.play" %% "play-json" % "2.9.0",
+  // [tflucke] 2021-12-18: TODO: Exclude 3.1.0 because scalajs doesn't support it.
+    libraryDependencies += "com.typesafe.play" %% "play-json" % "2.10.0-RC5",
     libraryDependencies +=  "org.scalaj" %% "scalaj-http" % "2.4.2"
   )
   .jsSettings(
@@ -88,6 +88,7 @@ lazy val playPlugin = (project in file("play"))
     scriptedLaunchOpts := { scriptedLaunchOpts.value ++ Seq(
       "-Xmx1024M",
       "-Dplugin.version="+version.value,
+      "-Dhttp.port=10000",
     ) },
     scriptedBufferLog := false,
     publishLocal := (publishLocal dependsOn (plugin / publishLocal)).value

+ 3 - 3
play/src/sbt-test/webroutes/dummy/build.sbt

@@ -2,8 +2,8 @@ lazy val server: Project = (project in file("server"))
   .settings(
     version := "0.1.0",
     scalaJSProjects := Seq(client),
-    pipelineStages in Assets := Seq(scalaJSPipeline),
-    compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value,
+    Assets / pipelineStages := Seq(scalaJSPipeline),
+    Compile / compile := ((Compile / compile) dependsOn scalaJSPipeline).value,
     libraryDependencies += guice,
     libraryDependencies += "com.vmunier" %% "scalajs-scripts" % "1.1.4",
     libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % "test"
@@ -33,6 +33,6 @@ lazy val sharedJvm = shared.jvm
 lazy val sharedJs = shared.js
 
 // loads the server project at sbt startup
-onLoad in Global := (onLoad in Global).value.andThen(
+Global / onLoad := (Global / onLoad).value.andThen(
   state => "project server" :: state
 )

+ 1 - 1
play/src/sbt-test/webroutes/dummy/project/build.properties

@@ -1 +1 @@
-sbt.version=1.3.8
+sbt.version=1.6.1

+ 2 - 2
play/src/sbt-test/webroutes/dummy/project/plugins.sbt

@@ -1,5 +1,5 @@
-addSbtPlugin("org.scala-js"       % "sbt-scalajs"               % "1.1.0")
-addSbtPlugin("com.typesafe.play"  % "sbt-plugin"                % "2.8.1")
+addSbtPlugin("org.scala-js"       % "sbt-scalajs"               % "1.6.0")
+addSbtPlugin("com.typesafe.play"  % "sbt-plugin"                % "2.8.8")
 addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject"  % "1.0.0")
 addSbtPlugin("com.vmunier"        % "sbt-web-scalajs"           % "1.0.11")
 

+ 0 - 1
play/src/sbt-test/webroutes/dummy/server/app/org/sample/dummy/controllers/PojoController.scala

@@ -9,7 +9,6 @@ import org.sample.dummy.shared.models._
 import org.sample.dummy.shared.models.Pojo._
 
 import scala.concurrent.Future
-import java.io.ObjectInputFilter.Status
 
 @Singleton
 class PojoController @Inject()(

+ 5 - 5
play/src/sbt-test/webroutes/user/build.sbt

@@ -7,9 +7,9 @@ lazy val server: Project = (project in file("server"))
   .settings(commonSettings)
   .settings(
     scalaJSProjects := Seq(client),
-    pipelineStages in Assets := Seq(scalaJSPipeline),
-    compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value,
-    javaOptions in Test += "-Dconfig.file=conf/testing.conf",
+    Assets / pipelineStages := Seq(scalaJSPipeline),
+    Compile / compile := ((Compile / compile) dependsOn scalaJSPipeline).value,
+    Test / javaOptions += "-Dconfig.file=conf/testing.conf",
     libraryDependencies ++= Seq(
       evolutions,
       guice,
@@ -33,7 +33,7 @@ lazy val client = (project in file("client"))
   .settings(
     scalaJSUseMainModuleInitializer := true,
     Compile / apiDefinitions += PlayEndpointFile(server),
-    libraryDependencies += "org.querki"      %%% "jquery-facade"  % "2.0"
+    libraryDependencies += "org.querki"      %%% "jquery-facade"  % "2.1"
   )
   .enablePlugins(ScalaJSPlugin, RestRPC, ScalaJSWeb)
   .dependsOn(sharedJs)
@@ -50,6 +50,6 @@ lazy val sharedJvm = shared.jvm
 lazy val sharedJs = shared.js
 
 // loads the server project at sbt startup
-onLoad in Global := (onLoad in Global).value.andThen(
+Global / onLoad := (Global / onLoad).value.andThen(
   state => "project server" :: state
 )

+ 1 - 1
play/src/sbt-test/webroutes/user/project/build.properties

@@ -1 +1 @@
-sbt.version=1.3.10
+sbt.version=1.6.1

+ 2 - 2
play/src/sbt-test/webroutes/user/project/plugins.sbt

@@ -1,5 +1,5 @@
-addSbtPlugin("org.scala-js"       % "sbt-scalajs"               % "1.1.0")
-addSbtPlugin("com.typesafe.play"  % "sbt-plugin"                % "2.8.2")
+addSbtPlugin("org.scala-js"       % "sbt-scalajs"               % "1.7.0")
+addSbtPlugin("com.typesafe.play"  % "sbt-plugin"                % "2.8.8")
 addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject"  % "1.0.0")
 addSbtPlugin("com.vmunier"        % "sbt-web-scalajs"           % "1.0.11")
 

+ 1 - 1
play/src/sbt-test/webroutes/user/server/conf/testing.conf

@@ -7,4 +7,4 @@ play.filters.csrf.header.bypassHeaders {
 }
 
 # TODO: See if test file can run evolutions instead
-play.evolutions.autoApply=true
+play.evolutions.autoApply=true

+ 1 - 1
project/build.properties

@@ -1 +1 @@
-sbt.version=1.5.0
+sbt.version=1.6.1

+ 1 - 1
project/plugins.sbt

@@ -1,4 +1,4 @@
-val ScalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.5.1")
+val ScalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.6.0")
 
 addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject"  % "1.1.0")