Skip to content

Commit

Permalink
DAS-356 use latest common plugin (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavji authored Jun 1, 2021
1 parent 24ac9bb commit 7cd16aa
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 56 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
target-branch: "main"
Expand Down
9 changes: 1 addition & 8 deletions .scalafix.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
rules =
[ ExplicitResultTypes
, ProcedureSyntax
, NoValInForComprehension
]
RemoveUnused.imports = true
RemoveUnused.privates = false
RemoveUnused.locala = false
include ".scalafix-common.conf"
1 change: 0 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# include Dataswift config for scalafmt
include ".scalafmt-common.conf"

version = "2.6.1"
Expand Down
38 changes: 19 additions & 19 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Dependencies.Library
import Dependencies.LocalThirdParty
import play.sbt.PlayImport

val publishSettings = Seq(
publishMavenStyle := true,
Expand All @@ -29,17 +30,17 @@ lazy val silhouette = Project(
).settings(
publishSettings,
libraryDependencies ++= Seq(
Library.commonsLang3,
Library.Play.cache,
Library.Play.ws,
Library.Play.openid,
Library.Play.jsonJoda,
Library.jwtCore,
Library.jwtApi,
Library.Play.specs2 % Test,
Library.specs2MatcherExtra % Test,
Library.scalaGuice % Test,
Library.akkaTestkit % Test
PlayImport.cacheApi,
PlayImport.ws,
PlayImport.component("play-openid"),
Lib.AtlassianJwtApi,
Lib.AtlassianJwtCore,
Lib.CommonsLang3,
Lib.PlayJsonJoda,
Lib.ScalaGuice % Test,
LocalThirdParty.specs2MatcherExtra % Test,
LocalThirdParty.akkaTestkit % Test,
PlayImport.component("play-specs2") % Test
)
).enablePlugins(PlayScala)

Expand All @@ -48,8 +49,8 @@ lazy val silhouetteCas = Project(
base = file("silhouette-cas")
).settings(publishSettings,
libraryDependencies ++= Seq(
Library.casClient,
Library.casClientSupportSAML
LocalThirdParty.casClient,
LocalThirdParty.casClientSupportSAML
)
).dependsOn(silhouette % "compile->compile;test->test")

Expand All @@ -62,7 +63,7 @@ lazy val silhouetteCryptoJca = Project(
lazy val silhouettePasswordBcrypt = Project(
id = "dataswift-play-silhouette-password-bcrypt",
base = file("silhouette-password-bcrypt")
).settings(publishSettings, libraryDependencies += Library.jbcrypt)
).settings(publishSettings, libraryDependencies += Lib.JBcrypt)
.dependsOn(silhouette % "compile->compile;test->test")

lazy val silhouettePersistence = Project(
Expand All @@ -74,7 +75,7 @@ lazy val silhouettePersistence = Project(
lazy val silhouetteTestkit = Project(
id = "dataswift-play-silhouette-testkit",
base = file("silhouette-testkit")
).settings(publishSettings, libraryDependencies += Library.Play.test)
).settings(publishSettings, libraryDependencies += PlayImport.component("play-test"))
.dependsOn(silhouette % "compile->compile;test->test")
.enablePlugins(PlayScala)

Expand All @@ -91,14 +92,13 @@ val root = Project("play-silhouette-root", file("."))

inThisBuild(
List(
scalaVersion := "2.13.5",
scalafixScalaBinaryVersion := "2.13",
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
organization := "com.mohiva",
resolvers += "Atlassian Releases" at "https://maven.atlassian.com/public/",
parallelExecution in Test := false,
fork in Test := true,
Test / parallelExecution := false,
Test / fork := true,
// Needed to avoid https://github.com/travis-ci/travis-ci/issues/3775 in forked tests
// in Travis with `sudo: false`.
// See https://github.com/sbt/sbt/issues/653
Expand Down
21 changes: 3 additions & 18 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,11 @@ import sbt._

object Dependencies {

object Library {

object Play {
val version = play.core.PlayVersion.current
val ws = "com.typesafe.play" %% "play-ws" % version
val cache = "com.typesafe.play" %% "play-cache" % version
val test = "com.typesafe.play" %% "play-test" % version
val specs2 = "com.typesafe.play" %% "play-specs2" % version
val openid = "com.typesafe.play" %% "play-openid" % version
val jsonJoda = "com.typesafe.play" %% "play-json-joda" % "2.9.2"
}

object LocalThirdParty {
val specs2MatcherExtra = "org.specs2" %% "specs2-matcher-extra" % "4.8.3"
val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.12.0"
val jbcrypt = "de.svenkubiak" % "jBCrypt" % "0.4.1"
val jwtCore = "com.atlassian.jwt" % "jwt-core" % "2.0.5"
val jwtApi = "com.atlassian.jwt" % "jwt-api" % "3.2.0"
val scalaGuice = "net.codingwell" %% "scala-guice" % "4.2.11"
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % "2.6.10"
val casClient = "org.jasig.cas.client" % "cas-client-core" % "3.4.1"
val casClientSupportSAML = "org.jasig.cas.client" % "cas-client-support-saml" % "3.4.1"
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % "2.6.14"
}

}
3 changes: 1 addition & 2 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
sbt.version=1.4.9

sbt.version=1.5.3
9 changes: 2 additions & 7 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
resolvers += "HAT Library Artifacts releases" at "https://s3-eu-west-1.amazonaws.com/library-artifacts-releases.hubofallthings.com"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.7")
addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.19.0")
addSbtPlugin("io.dataswift" % "sbt-scalatools-common" % "0.2.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
resolvers += "HAT Library Artifacts Releases" at "https://s3-eu-west-1.amazonaws.com/library-artifacts-releases.hubofallthings.com"
addSbtPlugin("io.dataswift" % "sbt-scalatools-common" % "0.5.0")

0 comments on commit 7cd16aa

Please sign in to comment.