11import com .softwaremill .SbtSoftwareMillCommon .commonSmlBuildSettings
22import com .softwaremill .Publish .ossPublishSettings
33
4+ val scala2_12 = " 2.12.15"
5+ val scala2_13 = " 2.13.8"
6+ val scala2 = List (scala2_12, scala2_13)
7+
48lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq (
59 organization := " com.softwaremill.akka-http-session" ,
6- scalaVersion := " 2.13.8" ,
7- crossScalaVersions := Seq (scalaVersion.value, " 2.12.15" ),
810 versionScheme := Some (" early-semver" )
911)
1012
@@ -18,10 +20,10 @@ val scalaTest = "org.scalatest" %% "scalatest" % "3.2.11" % "test"
1820
1921lazy val rootProject = (project in file(" ." ))
2022 .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 : _* )
2325
24- lazy val core : Project = (project in file(" core" ))
26+ lazy val core = (projectMatrix in file(" core" ))
2527 .settings(commonSettings : _* )
2628 .settings(
2729 name := " core" ,
@@ -34,8 +36,9 @@ lazy val core: Project = (project in file("core"))
3436 scalaTest
3537 )
3638 )
39+ .jvmPlatform(scalaVersions = scala2)
3740
38- lazy val jwt : Project = (project in file(" jwt" ))
41+ lazy val jwt = (projectMatrix in file(" jwt" ))
3942 .settings(commonSettings : _* )
4043 .settings(
4144 name := " jwt" ,
@@ -48,9 +51,11 @@ lazy val jwt: Project = (project in file("jwt"))
4851 ),
4952 // generating docs for 2.13 causes an error: "not found: type DefaultFormats$"
5053 Compile / doc / sources := Seq .empty
51- ) dependsOn (core)
54+ )
55+ .jvmPlatform(scalaVersions = scala2)
56+ .dependsOn(core)
5257
53- lazy val example : Project = (project in file(" example" ))
58+ lazy val example = (projectMatrix in file(" example" ))
5459 .settings(commonSettings : _* )
5560 .settings(
5661 publishArtifact := false ,
@@ -61,9 +66,10 @@ lazy val example: Project = (project in file("example"))
6166 " org.json4s" %% " json4s-ext" % json4sVersion
6267 )
6368 )
69+ .jvmPlatform(scalaVersions = scala2)
6470 .dependsOn(core, jwt)
6571
66- lazy val javaTests : Project = (project in file(" javaTests" ))
72+ lazy val javaTests = (projectMatrix in file(" javaTests" ))
6773 .settings(commonSettings : _* )
6874 .settings(
6975 name := " javaTests" ,
@@ -80,4 +86,5 @@ lazy val javaTests: Project = (project in file("javaTests"))
8086 scalaTest
8187 )
8288 )
89+ .jvmPlatform(scalaVersions = scala2)
8390 .dependsOn(core, jwt)
0 commit comments