Skip to content

Commit 29fb5ad

Browse files
committed
reorganize tapir http session project
1 parent eba6877 commit 29fb5ad

File tree

80 files changed

+1382
-7798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1382
-7798
lines changed

.scalafmt.conf

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
maxColumn = 120
1+
version=3.0.2
2+
style = defaultWithAlign
3+
align.openParenCallSite = false
4+
align.openParenDefnSite = false
5+
align.tokens = [{code = "->"}, {code = "<-"}, {code = "=>", owner = "Case"}]
6+
continuationIndent.callSite = 2
7+
continuationIndent.defnSite = 2
8+
danglingParentheses = true
9+
indentOperator = spray
10+
maxColumn = 100
11+
indentOperator.preset = "spray"
12+
danglingParentheses.preset = true
13+
project.excludeFilters = [".*\\.sbt"]
14+
rewrite.rules = [RedundantParens, SortImports]
15+
spaces.inImportCurlyBraces = false
16+
unindentTopLevelOperators = true
17+
project.git = true

build.sbt

Lines changed: 15 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
2-
import com.softwaremill.Publish.ossPublishSettings
3-
4-
val scala2_12 = "2.12.15"
1+
val scala2_12 = "2.12.18"
52
val scala2_13 = "2.13.8"
63
val scala2 = List(scala2_12, scala2_13)
74

8-
lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
9-
organization := "com.softwaremill.akka-http-session",
5+
lazy val commonSettings = Seq(
6+
organization := "app.softnetwork.session",
107
versionScheme := Some("early-semver")
118
)
129

10+
val akkaHttpSession = "0.7.0"
1311
val akkaHttpVersion = "10.2.7"
1412
val akkaVersion = "2.6.18"
1513
val json4sVersion = "4.0.4"
@@ -21,41 +19,8 @@ val scalaTest = "org.scalatest" %% "scalatest" % "3.2.11" % "test"
2119

2220
lazy val rootProject = (project in file("."))
2321
.settings(commonSettings: _*)
24-
.settings(publish / skip := true, name := "akka-http-session", scalaVersion := scala2_13)
25-
.aggregate(core.projectRefs ++ jwt.projectRefs ++ example.projectRefs ++ javaTests.projectRefs ++ tapir.projectRefs: _*)
26-
27-
lazy val core = (projectMatrix in file("core"))
28-
.settings(commonSettings: _*)
29-
.settings(
30-
name := "core",
31-
libraryDependencies ++= Seq(
32-
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
33-
akkaStreams % "provided",
34-
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test",
35-
akkaStreamsTestkit,
36-
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
37-
"org.scalacheck" %% "scalacheck" % "1.15.4" % "test",
38-
scalaTest
39-
)
40-
)
41-
.jvmPlatform(scalaVersions = scala2)
42-
43-
lazy val jwt = (projectMatrix in file("jwt"))
44-
.settings(commonSettings: _*)
45-
.settings(
46-
name := "jwt",
47-
libraryDependencies ++= Seq(
48-
"org.json4s" %% "json4s-jackson" % json4sVersion,
49-
"org.json4s" %% "json4s-ast" % json4sVersion,
50-
"org.json4s" %% "json4s-core" % json4sVersion,
51-
akkaStreams % "provided",
52-
scalaTest
53-
),
54-
// generating docs for 2.13 causes an error: "not found: type DefaultFormats$"
55-
Compile / doc / sources := Seq.empty
56-
)
57-
.jvmPlatform(scalaVersions = scala2)
58-
.dependsOn(core)
22+
.settings(publish / skip := true, name := "tapir-http-session", scalaVersion := scala2_13)
23+
.aggregate(core.projectRefs ++ example.projectRefs: _*)
5924

6025
lazy val example = (projectMatrix in file("example"))
6126
.settings(commonSettings: _*)
@@ -71,37 +36,23 @@ lazy val example = (projectMatrix in file("example"))
7136
)
7237
)
7338
.jvmPlatform(scalaVersions = scala2)
74-
.dependsOn(tapir, jwt)
39+
.dependsOn(core)
7540

76-
lazy val javaTests = (projectMatrix in file("javaTests"))
41+
lazy val core = (projectMatrix in file("core"))
7742
.settings(commonSettings: _*)
7843
.settings(
79-
name := "javaTests",
80-
Test / testOptions := Seq(Tests.Argument(TestFrameworks.JUnit, "-a")), // required for javadsl JUnit tests
81-
crossPaths := false, // https://github.com/sbt/junit-interface/issues/35
82-
publishArtifact := false,
44+
name := "core",
8345
libraryDependencies ++= Seq(
84-
akkaStreams % "provided",
46+
"com.softwaremill.akka-http-session" %% "core" % akkaHttpSession excludeAll ExclusionRule(organization = "com.typesafe.akka"),
8547
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
48+
akkaStreams % "provided",
49+
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirVersion,
50+
"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % tapirVersion excludeAll ExclusionRule(organization = "com.typesafe.akka"),
8651
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test",
8752
akkaStreamsTestkit,
88-
"junit" % "junit" % "4.13.2" % "test",
89-
"com.github.sbt" % "junit-interface" % "0.13.3" % "test",
90-
scalaTest
91-
)
92-
)
93-
.jvmPlatform(scalaVersions = scala2)
94-
.dependsOn(core, jwt)
95-
96-
lazy val tapir = (projectMatrix in file("tapir"))
97-
.settings(commonSettings: _*)
98-
.settings(
99-
name := "tapir",
100-
libraryDependencies ++= Seq(
10153
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
102-
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirVersion,
103-
"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % tapirVersion excludeAll ExclusionRule(organization = "com.typesafe.akka")
54+
"org.scalacheck" %% "scalacheck" % "1.15.4" % "test",
55+
scalaTest
10456
)
10557
)
10658
.jvmPlatform(scalaVersions = scala2)
107-
.dependsOn(core % "compile->compile;test->test")

core/src/main/java/com/softwaremill/session/javadsl/CsrfDirectives.scala

Lines changed: 0 additions & 34 deletions
This file was deleted.

core/src/main/java/com/softwaremill/session/javadsl/HttpSessionAwareDirectives.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

core/src/main/java/com/softwaremill/session/javadsl/InMemoryRefreshTokenStorage.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

core/src/main/java/com/softwaremill/session/javadsl/SessionDirectives.scala

Lines changed: 0 additions & 56 deletions
This file was deleted.

core/src/main/java/com/softwaremill/session/javadsl/SessionSerializers.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

core/src/main/java/com/softwaremill/session/javadsl/SessionTransports.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)