Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize versions, add Scala 3 #34

Merged
merged 8 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [8, 11, 17]
java: [8, 11, 17, 20]
scala: [2.13.x, 3.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{matrix.java}}
- name: Test
run: sbt test
run: sbt ++${{matrix.scala}} test
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
scalaVersion := "2.13.10"
crossScalaVersions := Seq("2.13.11", "3.3.0")
scalaVersion := crossScalaVersions.value.head
scalacOptions ++= Seq("-deprecation", "-feature")

resolvers += "Akka library repository".at("https://repo.akka.io/maven")

libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % "10.1.15",
"com.typesafe.akka" %% "akka-stream" % "2.6.20",
"com.typesafe.akka" %% "akka-http" % "10.5.2",
"com.typesafe.akka" %% "akka-stream" % "2.8.4",
)
27 changes: 0 additions & 27 deletions project/Formatting.scala

This file was deleted.

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.7.2
sbt.version=1.9.4
2 changes: 0 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")

addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
8 changes: 4 additions & 4 deletions src/main/scala/akka/http/webgoat/BootWebGoat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ package akka.http.webgoat

import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.stream.ActorMaterializer
import akka.stream.Materializer

import scala.util.Failure
import scala.util.Success
import scala.util.control.NonFatal

object BootWebGoat extends App {
implicit val system = ActorSystem()
implicit val mat = ActorMaterializer()
implicit val system: ActorSystem = ActorSystem()
import system.dispatcher

try {
val bindingF =
Http()
.bindAndHandle(Routes.root, "localhost", 8080)
.newServerAt("localhost", 8080)
.bindFlow(Routes.root)

bindingF.onComplete {
case Success(binding) =>
Expand Down