-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
102 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,60 @@ | ||
import LibDependencies.PlayVersion | ||
|
||
val appName = "emailaddress" | ||
|
||
lazy val scala212 = "2.12.16" | ||
lazy val scala213 = "2.13.10" | ||
lazy val supportedScalaVersions = Seq(scala213, scala212) | ||
lazy val scala2_12 = "2.12.16" | ||
lazy val scala2_13 = "2.13.12" | ||
|
||
lazy val emailaddress = Project(appName, file(".")) | ||
.settings(majorVersion := 3) | ||
.settings(scalaVersion := scala213) | ||
.settings(isPublicArtefact := true) | ||
.settings(ScoverageSettings.apply(): _*) | ||
.settings( | ||
ThisBuild / scalaVersion := scala2_13 | ||
ThisBuild / majorVersion := 4 | ||
ThisBuild / isPublicArtefact := true | ||
|
||
lazy val commonSettings = | ||
ScoverageSettings() ++ | ||
Seq( | ||
scalacOptions ++= Seq( | ||
"-feature", | ||
"-language:implicitConversions" | ||
), | ||
libraryDependencies ++= Seq( | ||
"com.typesafe.play" %% "play-json" % "2.8.2" % Provided, | ||
"org.scalatest" %% "scalatest" % "3.2.14" % Test, | ||
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.14.0" % Test, | ||
"org.pegdown" % "pegdown" % "1.6.0" % Test, | ||
"org.scalacheck" %% "scalacheck" % "1.17.0" % Test, | ||
"com.vladsch.flexmark" % "flexmark-all" % "0.62.2" % Test | ||
), | ||
crossScalaVersions := supportedScalaVersions | ||
) | ||
) | ||
|
||
lazy val emailaddress = Project(appName, file(".")) | ||
.settings(publish / skip := true) | ||
.aggregate( | ||
play28, | ||
play29, | ||
play30 | ||
) | ||
|
||
lazy val play28 = Project(s"$appName-play-28", file("play-28")) | ||
.settings( | ||
crossScalaVersions := Seq(scala2_12, scala2_13), | ||
libraryDependencies ++= LibDependencies.compileDependencies(PlayVersion.Play28) +: LibDependencies.testDependencies, | ||
libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always, | ||
sharedSources | ||
) | ||
.settings(commonSettings) | ||
|
||
|
||
lazy val play29 = Project(s"$appName-play-29", file("play-29")) | ||
.settings( | ||
crossScalaVersions := Seq(scala2_13), | ||
libraryDependencies ++= LibDependencies.compileDependencies(PlayVersion.Play29) +: LibDependencies.testDependencies, | ||
sharedSources | ||
) | ||
.settings(commonSettings) | ||
|
||
lazy val play30 = Project(s"$appName-play-30", file("play-30")) | ||
.settings( | ||
crossScalaVersions := Seq(scala2_13), | ||
libraryDependencies ++= LibDependencies.compileDependencies(PlayVersion.Play30) +: LibDependencies.testDependencies, | ||
sharedSources | ||
) | ||
.settings(commonSettings) | ||
|
||
def sharedSources = Seq( | ||
Compile / unmanagedSourceDirectories += baseDirectory.value / "../shared/src/main/scala", | ||
Compile / unmanagedResourceDirectories += baseDirectory.value / "../shared/src/main/resources", | ||
Test / unmanagedSourceDirectories += baseDirectory.value / "../shared/src/test/scala", | ||
Test / unmanagedResourceDirectories += baseDirectory.value / "../shared/src/test/resources" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import sbt.* | ||
|
||
object LibDependencies { | ||
|
||
sealed trait PlayVersion | ||
|
||
object PlayVersion { | ||
|
||
case object Play28 extends PlayVersion | ||
|
||
case object Play29 extends PlayVersion | ||
|
||
case object Play30 extends PlayVersion | ||
|
||
} | ||
|
||
def compileDependencies(playVersion: PlayVersion) = playVersion match { | ||
case PlayVersion.Play28 => "com.typesafe.play" %% "play" % "2.8.21" | ||
case PlayVersion.Play29 => "com.typesafe.play" %% "play" % "2.9.0" | ||
case PlayVersion.Play30 => "org.playframework" %% "play" % "3.0.0" | ||
} | ||
|
||
val testDependencies = Seq( | ||
"org.scalatest" %% "scalatest" % "3.2.17", | ||
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.14.0", | ||
"org.pegdown" % "pegdown" % "1.6.0", | ||
"org.scalacheck" %% "scalacheck" % "1.17.0", | ||
"com.vladsch.flexmark" % "flexmark-all" % "0.64.8" | ||
).map(_ % Test) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.6.2 | ||
sbt.version=1.9.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
resolvers += MavenRepository("HMRC-open-artefacts-maven2", "https://open.artefacts.tax.service.gov.uk/maven2") | ||
resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns) | ||
|
||
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.8.0") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") | ||
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.15.0") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.