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

Update project dependencies #119

Closed
wants to merge 1 commit into from
Closed
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
64 changes: 32 additions & 32 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ organization := "org.omg"

version := "2024-07"

javacOptions ++= Seq("-source", "11", "-target", "11", "-Xlint")

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion := "2.12.6"

libraryDependencies += guice
libraryDependencies += "org.hibernate" % "hibernate-core" % "5.4.1.Final"
libraryDependencies += "org.hibernate" % "hibernate-jpamodelgen" % "5.4.1.Final"
libraryDependencies += "org.postgresql" % "postgresql" % "42.2.5"
libraryDependencies += "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.8"
libraryDependencies += "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.8"
libraryDependencies += "com.fasterxml.jackson.datatype" % "jackson-datatype-hibernate5" % "2.9.8"
libraryDependencies += "io.swagger" % "swagger-play2_2.12" % "1.6.0"
libraryDependencies += "org.reflections" % "reflections" % "0.9.10"
scalaVersion := "2.12.20"

lazy val root = (project in file("."))
.enablePlugins(PlayJava)
.settings(
libraryDependencies ++= Seq(
"com.google.inject" % "guice" % "5.1.0",
"com.typesafe.play" %% "play-guice" % "2.8.20",
"com.typesafe.play" %% "play" % "2.8.20", // Core Play dependency
"org.hibernate" % "hibernate-core" % "5.4.1.Final",
"org.hibernate" % "hibernate-jpamodelgen" % "5.4.1.Final",
"org.postgresql" % "postgresql" % "42.2.5",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.8",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.8",
"com.fasterxml.jackson.datatype" % "jackson-datatype-hibernate5" % "2.9.8",
"io.swagger" % "swagger-play2_2.12" % "1.6.0",
"org.reflections" % "reflections" % "0.9.10",
"com.typesafe.play" %% "twirl-api" % "1.5.1",
"org.scala-lang.modules" %% "scala-xml" % "2.1.0"
)
)

dependencyOverrides += "org.scala-lang.modules" %% "scala-xml" % "2.1.0"

ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % "early-semver"

javacOptions ++= Seq("-s", "app")

// https://stackoverflow.com/questions/42568234/intellij-idea-support-for-immutables-with-sbt
// tell sbt (and by extension IDEA) that there is source code in target/generated_sources
managedSourceDirectories in Compile += baseDirectory.value / "generated"
// before compilation happens, create the target/generated_sources directory
compile in Compile := (compile in Compile).dependsOn(Def.task({
(baseDirectory.value / "generated").mkdirs()
})).value
// tell the java compiler to output generated source files to target/generated_sources
javacOptions in Compile ++= Seq("-s", "generated")

sources in(Compile, doc) := Seq.empty
publishArtifact in(Compile, packageDoc) := false
javacOptions ++= Seq("-source", "11", "-target", "11", "-Xlint")
fork in run := true

// https://github.com/playframework/playframework/issues/8286#issuecomment-488733669
// hopefully fixed in Play 2.8
PlayKeys.devSettings += "play.server.http.idleTimeout" -> "infinite"
javaOptions ++= Seq(
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens", "java.base/sun.reflect.annotation=ALL-UNNAMED"
)
2 changes: 1 addition & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
play.editor="http://localhost:63342/api/file/?file=%s&line=%s"

play.http.secret.key="whatever"
play.modules.enabled += "play.modules.swagger.SwaggerModule"
#play.modules.enabled += "play.modules.swagger.SwaggerModule"
play.filters.headers.contentSecurityPolicy = null
play.filters.disabled += play.filters.csrf.CSRFFilter
play.http.errorHandler = play.http.JsonHttpErrorHandler
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.8
sbt.version=1.7.2
4 changes: 3 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.1")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.20")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")