1
1
import com .softwaremill .SbtSoftwareMillCommon .commonSmlBuildSettings
2
2
import com .softwaremill .Publish .ossPublishSettings
3
3
4
+ val scala2_12 = " 2.12.15"
5
+ val scala2_13 = " 2.13.8"
6
+ val scala2 = List (scala2_12, scala2_13)
7
+
4
8
lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq (
5
9
organization := " com.softwaremill.akka-http-session" ,
6
- scalaVersion := " 2.13.8" ,
7
- crossScalaVersions := Seq (scalaVersion.value, " 2.12.15" ),
8
10
versionScheme := Some (" early-semver" )
9
11
)
10
12
@@ -18,10 +20,10 @@ val scalaTest = "org.scalatest" %% "scalatest" % "3.2.11" % "test"
18
20
19
21
lazy val rootProject = (project in file(" ." ))
20
22
.settings(commonSettings : _* )
21
- .settings(publishArtifact := false , name := " akka-http-session" )
22
- .aggregate(core, jwt, example, javaTests)
23
+ .settings(publish / skip := true , name := " akka-http-session" , scalaVersion := scala2_13 )
24
+ .aggregate(core.projectRefs ++ jwt.projectRefs ++ example.projectRefs ++ javaTests.projectRefs : _* )
23
25
24
- lazy val core : Project = (project in file(" core" ))
26
+ lazy val core = (projectMatrix in file(" core" ))
25
27
.settings(commonSettings : _* )
26
28
.settings(
27
29
name := " core" ,
@@ -34,8 +36,9 @@ lazy val core: Project = (project in file("core"))
34
36
scalaTest
35
37
)
36
38
)
39
+ .jvmPlatform(scalaVersions = scala2)
37
40
38
- lazy val jwt : Project = (project in file(" jwt" ))
41
+ lazy val jwt = (projectMatrix in file(" jwt" ))
39
42
.settings(commonSettings : _* )
40
43
.settings(
41
44
name := " jwt" ,
@@ -48,9 +51,11 @@ lazy val jwt: Project = (project in file("jwt"))
48
51
),
49
52
// generating docs for 2.13 causes an error: "not found: type DefaultFormats$"
50
53
Compile / doc / sources := Seq .empty
51
- ) dependsOn (core)
54
+ )
55
+ .jvmPlatform(scalaVersions = scala2)
56
+ .dependsOn(core)
52
57
53
- lazy val example : Project = (project in file(" example" ))
58
+ lazy val example = (projectMatrix in file(" example" ))
54
59
.settings(commonSettings : _* )
55
60
.settings(
56
61
publishArtifact := false ,
@@ -61,9 +66,10 @@ lazy val example: Project = (project in file("example"))
61
66
" org.json4s" %% " json4s-ext" % json4sVersion
62
67
)
63
68
)
69
+ .jvmPlatform(scalaVersions = scala2)
64
70
.dependsOn(core, jwt)
65
71
66
- lazy val javaTests : Project = (project in file(" javaTests" ))
72
+ lazy val javaTests = (projectMatrix in file(" javaTests" ))
67
73
.settings(commonSettings : _* )
68
74
.settings(
69
75
name := " javaTests" ,
@@ -80,4 +86,5 @@ lazy val javaTests: Project = (project in file("javaTests"))
80
86
scalaTest
81
87
)
82
88
)
89
+ .jvmPlatform(scalaVersions = scala2)
83
90
.dependsOn(core, jwt)
0 commit comments