@@ -4,11 +4,13 @@ import java.nio.file.StandardCopyOption.REPLACE_EXISTING
4
4
ThisBuild / versionScheme := Some (" early-semver" )
5
5
// For all Sonatype accounts created on or after February 2021
6
6
ThisBuild / sonatypeCredentialHost := " s01.oss.sonatype.org"
7
+ ThisBuild / scalaVersion := " 3.3.0"
7
8
8
9
inThisBuild(
9
10
List (
10
11
organization := " net.wiringbits" ,
11
12
name := " scala-postgres-react-admin" ,
13
+ scalaVersion := " 3.3.0" ,
12
14
homepage := Some (url(" https://github.com/wiringbits/scala-postgres-react-admin" )),
13
15
licenses := List (" MIT" -> url(" https://www.opensource.org/licenses/mit-license.html" )),
14
16
developers := List (
@@ -24,8 +26,12 @@ inThisBuild(
24
26
25
27
resolvers += Resolver .sonatypeRepo(" releases" )
26
28
27
- val playJson = " 2.10.0-RC5"
29
+ val play = " 2.9.0-M6"
30
+ val playJson = " 2.10.0-RC9"
28
31
val sttp = " 3.5.0"
32
+ val anorm = " 2.7.0"
33
+ val scalaTestPlusPlay = " 6.0.0-M6"
34
+ val scalaTestPlusMockito = " 3.2.15.0"
29
35
30
36
val consoleDisabledOptions = Seq (" -Xfatal-warnings" , " -Ywarn-unused" , " -Ywarn-unused-import" )
31
37
@@ -35,8 +41,7 @@ lazy val build = TaskKey[File]("build")
35
41
lazy val baseServerSettings : Project => Project = {
36
42
_.settings(
37
43
scalacOptions ++= Seq (
38
- " -unchecked" ,
39
- " -deprecation" ,
44
+ " -Werror" ,
40
45
" -feature"
41
46
),
42
47
Compile / doc / scalacOptions ++= Seq (" -no-link-warnings" ),
@@ -55,18 +60,15 @@ lazy val playSettings: Project => Project = {
55
60
Compile / doc / scalacOptions ++= Seq (
56
61
" -no-link-warnings"
57
62
),
58
- // remove play noisy warnings
59
- play.sbt.routes.RoutesKeys .routesImport := Seq .empty,
60
63
libraryDependencies ++= Seq (
61
64
evolutions,
62
- " com.typesafe.play" %% " play-jdbc" % " 2.8.13 " ,
65
+ " com.typesafe.play" %% " play-jdbc" % " 2.9.0-M6 " ,
63
66
" com.google.inject" % " guice" % " 5.1.0"
64
67
),
65
68
// test
66
69
libraryDependencies ++= Seq (
67
- " org.scalatestplus.play" %% " scalatestplus-play" % " 5.1.0" % Test ,
68
- " org.mockito" %% " mockito-scala" % " 1.17.5" % Test ,
69
- " org.mockito" %% " mockito-scala-scalatest" % " 1.17.5" % Test
70
+ " org.scalatestplus.play" %% " scalatestplus-play" % " 6.0.0-M6" % Test ,
71
+ " org.scalatestplus" %% " mockito-4-6" % scalaTestPlusMockito % Test
70
72
)
71
73
)
72
74
}
@@ -105,11 +107,6 @@ lazy val baseLibSettings: Project => Project = _.settings(
105
107
// The common stuff for the server/client modules
106
108
lazy val spraCommon = (crossProject(JSPlatform , JVMPlatform ) in file(" spra-common" ))
107
109
.configure(baseLibSettings)
108
- .settings(
109
- scalaVersion := " 2.13.8" ,
110
- crossScalaVersions := Seq (" 2.13.8" , " 3.1.2" ),
111
- name := " spra-common"
112
- )
113
110
.jsConfigure(_.enablePlugins(ScalaJSPlugin , ScalaJSBundlerPlugin ))
114
111
.jvmSettings(
115
112
libraryDependencies ++= Seq (
@@ -131,11 +128,6 @@ lazy val spraCommon = (crossProject(JSPlatform, JVMPlatform) in file("spra-commo
131
128
lazy val spraApi = (crossProject(JSPlatform , JVMPlatform ) in file(" spra-api" ))
132
129
.configure(baseLibSettings)
133
130
.dependsOn(spraCommon)
134
- .settings(
135
- scalaVersion := " 2.13.8" ,
136
- crossScalaVersions := Seq (" 2.13.8" , " 3.1.2" ),
137
- name := " spra-api"
138
- )
139
131
.jsConfigure(_.enablePlugins(ScalaJSPlugin , ScalaJSBundlerPlugin ))
140
132
.jvmSettings(
141
133
libraryDependencies ++= Seq (
@@ -156,19 +148,16 @@ lazy val spraApi = (crossProject(JSPlatform, JVMPlatform) in file("spra-api"))
156
148
/** Includes the specific stuff to run the SPRA server side (play-specific)
157
149
*/
158
150
lazy val spraPlayServer = (project in file(" spra-play-server" ))
151
+ .enablePlugins(PlayScala )
159
152
.dependsOn(spraApi.jvm, spraCommon.jvm)
160
153
.configure(baseServerSettings, playSettings)
161
154
.settings(
162
- scalaVersion := " 2.13.8" ,
163
- crossScalaVersions := Seq (" 2.13.8" ),
164
- name := " spra-play-server" ,
165
155
fork := true ,
166
156
Test / fork := true , // allows for graceful shutdown of containers once the tests have finished running
167
157
libraryDependencies ++= Seq (
168
158
guice,
169
- " org.playframework.anorm" %% " anorm" % " 2.6.10" ,
170
- " com.typesafe.play" %% " play" % " 2.8.13" ,
171
- " com.typesafe.play" %% " play-json" % " 2.9.2" ,
159
+ " org.playframework.anorm" %% " anorm" % anorm,
160
+ " com.typesafe.play" %% " play-json" % playJson,
172
161
" org.postgresql" % " postgresql" % " 42.3.6" ,
173
162
" com.github.jwt-scala" %% " jwt-core" % " 9.0.5" ,
174
163
" de.svenkubiak" % " jBCrypt" % " 0.4.3" ,
@@ -254,22 +243,19 @@ lazy val browserProject: Project => Project =
254
243
)
255
244
256
245
lazy val spraWeb = (project in file(" spra-web" ))
257
- .dependsOn(spraApi.js, spraPlayServer )
246
+ .dependsOn(spraApi.js)
258
247
.configure(bundlerSettings, baseLibSettings, browserProject, spraWebBuildInfoSettings)
259
248
.configure(_.enablePlugins(ScalaJSPlugin , ScalaJSBundlerPlugin ))
260
249
.settings(
261
- scalaVersion := " 2.13.8" ,
262
- crossScalaVersions := Seq (" 2.13.8" , " 3.1.2" ),
263
- name := " spra-web" ,
264
250
Test / fork := false , // sjs needs this to run tests
265
251
scalaJSUseMainModuleInitializer := true ,
266
252
scalaJSLinkerConfig := scalaJSLinkerConfig.value.withSourceMap(false ),
267
253
webpackDevServerPort := 8081 ,
268
254
webpackBundlingMode := BundlingMode .LibraryOnly (),
269
255
libraryDependencies ++= Seq (
270
256
" org.scala-js" %%% " scala-js-macrotask-executor" % " 1.0.0" ,
271
- " me.shadaj" %%% " slinky-core" % " 0.7.3 " ,
272
- " me.shadaj" %%% " slinky-web" % " 0.7.3 "
257
+ " me.shadaj" %%% " slinky-core" % " 0.7.4 " ,
258
+ " me.shadaj" %%% " slinky-web" % " 0.7.4 "
273
259
),
274
260
Compile / npmDependencies ++= Seq (
275
261
" react" -> " 17.0.0" ,
0 commit comments