Skip to content

Commit

Permalink
#1604 Update Play
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Oct 30, 2020
1 parent c959f67 commit f870c9c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 37 deletions.
9 changes: 5 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ lazy val thehiveBackend = (project in file("thehive-backend"))
Library.zip4j,
Library.reflections,
Library.akkaCluster,
Library.akkaClusterTools
Library.akkaClusterTools,
Library.akkaClusterTyped
),
play.sbt.routes.RoutesKeys.routesImport -= "controllers.Assets.Asset"
)
Expand Down Expand Up @@ -83,9 +84,9 @@ lazy val rpmPackageRelease = (project in file("package/rpm-release"))
|GPG key as well as configuration for yum.""".stripMargin,
linuxPackageMappings in Rpm := Seq(
packageMapping(
file("PGP-PUBLIC-KEY") "etc/pki/rpm-gpg/GPG-TheHive-Project",
file("package/rpm-release/thehive-rpm.repo") "/etc/yum.repos.d/thehive-rpm.repo",
file("LICENSE") "/usr/share/doc/thehive-project-release/LICENSE"
file("PGP-PUBLIC-KEY") -> "etc/pki/rpm-gpg/GPG-TheHive-Project",
file("package/rpm-release/thehive-rpm.repo") -> "/etc/yum.repos.d/thehive-rpm.repo",
file("LICENSE") -> "/usr/share/doc/thehive-project-release/LICENSE"
)
)
)
Expand Down
31 changes: 15 additions & 16 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,43 @@ object Common {
val projectSettings = Seq(
organizationName := "TheHive-Project",
organization := "org.thehive-project",
licenses += "AGPL-V3" url("https://www.gnu.org/licenses/agpl-3.0.html"),
licenses += "AGPL-V3" -> url("https://www.gnu.org/licenses/agpl-3.0.html"),
organizationHomepage := Some(url("http://thehive-project.org/")),
resolvers += Resolver.bintrayRepo("thehive-project", "maven"),
resolvers += "elasticsearch-releases" at "https://artifacts.elastic.co/maven",
scalaVersion := Dependencies.scalaVersion,
scalacOptions ++= Seq(
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
//"-Xfatal-warnings", // Fail the compilation if there are any warnings.
"-Xlint", // Enable recommended additional warnings.
"-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver.
"-Ywarn-dead-code", // Warn when dead code is identified.
"-Ywarn-inaccessible", // Warn about inaccessible types in method signatures.
"-Xlint", // Enable recommended additional warnings.
"-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver.
"-Ywarn-dead-code", // Warn when dead code is identified.
"-Ywarn-inaccessible", // Warn about inaccessible types in method signatures.
"-Ywarn-nullary-override", // Warn when non-nullary overrides nullary, e.g. def foo() over def foo.
"-Ywarn-numeric-widen" // Warn when numerics are widened.
"-Ywarn-numeric-widen" // Warn when numerics are widened.
),
scalacOptions in Test ~= { options
scalacOptions in Test ~= { options =>
options filterNot (_ == "-Ywarn-dead-code") // Allow dead code in tests (to support using mockito).
},
parallelExecution in Test := false,
fork in Test := true,
javaOptions += "-Xmx1G",

// Redirect logs from ElasticSearch (which uses log4j2) to slf4j
libraryDependencies += "org.apache.logging.log4j" % "log4j-to-slf4j" % "2.9.1",
excludeDependencies += "org.apache.logging.log4j" % "log4j-core"
)

val stableVersion: Regex = "(\\d+\\.\\d+\\.\\d+)-(\\d+)".r
val betaVersion: Regex = "(\\d+\\.\\d+\\.\\d+)-[Rr][Cc](\\d+)".r
val betaVersion: Regex = "(\\d+\\.\\d+\\.\\d+)-[Rr][Cc](\\d+)".r

object snapshotVersion {
def unapplySeq(version: String): Option[List[String]] = {

def unapplySeq(version: String): Option[List[String]] =
if (version.endsWith("-SNAPSHOT")) {
val v = version.dropRight(9)
stableVersion.unapplySeq(v) orElse betaVersion.unapplySeq(v)
}
else None
}
} else None
}
}
}
32 changes: 16 additions & 16 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import sbt._

object Dependencies {
val scalaVersion = "2.12.8"
val scalaVersion = "2.12.12"

object Library {
val akkaVersion = "2.5.26"

object Play {
val version = play.core.PlayVersion.current
val ws = "com.typesafe.play" %% "play-ws" % version
val ahc = "com.typesafe.play" %% "play-ahc-ws" % version
val cache = "com.typesafe.play" %% "play-ehcache" % version
val test = "com.typesafe.play" %% "play-test" % version
val specs2 = "com.typesafe.play" %% "play-specs2" % version
val filters = "com.typesafe.play" %% "filters-helpers" % version
val guice = "com.typesafe.play" %% "play-guice" % version
val ws = "com.typesafe.play" %% "play-ws" % play.core.PlayVersion.current
val ahc = "com.typesafe.play" %% "play-ahc-ws" % play.core.PlayVersion.current
val cache = "com.typesafe.play" %% "play-ehcache" % play.core.PlayVersion.current
val test = "com.typesafe.play" %% "play-test" % play.core.PlayVersion.current
val specs2 = "com.typesafe.play" %% "play-specs2" % play.core.PlayVersion.current
val filters = "com.typesafe.play" %% "filters-helpers" % play.core.PlayVersion.current
val guice = "com.typesafe.play" %% "play-guice" % play.core.PlayVersion.current
}

val scalaGuice = "net.codingwell" %% "scala-guice" % "4.2.3"
val scalaGuice = "net.codingwell" %% "scala-guice" % "4.2.6"

val reflections = "org.reflections" % "reflections" % "0.9.11"
val zip4j = "net.lingala.zip4j" % "zip4j" % "1.3.2"
val elastic4play = "org.thehive-project" %% "elastic4play" % "1.11.6"
val akkaCluster = "com.typesafe.akka" %% "akka-cluster" % akkaVersion
val akkaClusterTools = "com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion
val akkaVersion = "2.5.31"
val reflections = "org.reflections" % "reflections" % "0.9.11"
val zip4j = "net.lingala.zip4j" % "zip4j" % "1.3.2"
val elastic4play = "org.thehive-project" %% "elastic4play" % "1.11.8"
val akkaCluster = "com.typesafe.akka" %% "akka-cluster" % akkaVersion
val akkaClusterTools = "com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion
val akkaClusterTyped = "com.typesafe.akka" %% "akka-cluster-typed" % akkaVersion
}
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Comment to get more information during initialization
logLevel := Level.Info

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.25")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.6")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.0")
addSbtPlugin("org.thehive-project" % "sbt-github-changelog" % "0.3.0")

0 comments on commit f870c9c

Please sign in to comment.