-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.sbt
116 lines (98 loc) · 5.15 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import uk.gov.hmrc.DefaultBuildSettings
// Disable multiple project tests running at the same time, since notablescan flag is a global setting.
// https://www.scala-sbt.org/1.x/docs/Parallel-Execution.html
Global / concurrentRestrictions += Tags.limitSum(1, Tags.Test, Tags.Untagged)
val scala2_13 = "2.13.12"
val scala3 = "3.3.3"
ThisBuild / majorVersion := 2
ThisBuild / scalaVersion := scala2_13
ThisBuild / isPublicArtefact := true
ThisBuild / scalacOptions ++= Seq("-feature")
ThisBuild / organization := "uk.gov.hmrc.mongo"
lazy val library = Project("hmrc-mongo", file("."))
.settings(publish / skip := true)
.aggregate(
hmrcMongoCommon,
hmrcMongoPlay28, hmrcMongoTestPlay28, hmrcMongoMetrixPlay28, hmrcMongoWorkItemRepoPlay28,
hmrcMongoPlay29, hmrcMongoTestPlay29, hmrcMongoMetrixPlay29, hmrcMongoWorkItemRepoPlay29,
hmrcMongoPlay30, hmrcMongoTestPlay30, hmrcMongoMetrixPlay30, hmrcMongoWorkItemRepoPlay30
)
lazy val hmrcMongoCommon = Project("hmrc-mongo-common", file("hmrc-mongo-common"))
.settings(
crossScalaVersions := Seq(scala2_13, scala3),
libraryDependencies ++= LibDependencies.mongoCommon(scalaVersion.value)
)
def copyPlay30Sources(module: Project) =
CopySources.copySources(
module,
transformSource = _.replace("org.apache.pekko", "akka"),
transformResource = _.replace("pekko", "akka")
)
lazy val hmrcMongoPlay28 = Project("hmrc-mongo-play-28", file("hmrc-mongo-play-28"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoPlay("play-28", scalaVersion.value),
copyPlay30Sources(hmrcMongoPlay30)
).dependsOn(hmrcMongoCommon)
lazy val hmrcMongoPlay29 = Project("hmrc-mongo-play-29", file("hmrc-mongo-play-29"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoPlay("play-29", scalaVersion.value),
copyPlay30Sources(hmrcMongoPlay30)
).dependsOn(hmrcMongoCommon)
lazy val hmrcMongoPlay30 = Project("hmrc-mongo-play-30", file("hmrc-mongo-play-30"))
.settings(
crossScalaVersions := Seq(scala2_13, scala3),
libraryDependencies ++= LibDependencies.hmrcMongoPlay("play-30", scalaVersion.value)
).dependsOn(hmrcMongoCommon)
lazy val hmrcMongoTestPlay28 = Project("hmrc-mongo-test-play-28", file("hmrc-mongo-test-play-28"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoTestPlay("play-28", scalaVersion.value),
copyPlay30Sources(hmrcMongoTestPlay30)
).dependsOn(hmrcMongoPlay28)
lazy val hmrcMongoTestPlay29 = Project("hmrc-mongo-test-play-29", file("hmrc-mongo-test-play-29"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoTestPlay("play-29", scalaVersion.value),
copyPlay30Sources(hmrcMongoTestPlay30)
).dependsOn(hmrcMongoPlay29)
lazy val hmrcMongoTestPlay30 = Project("hmrc-mongo-test-play-30", file("hmrc-mongo-test-play-30"))
.settings(
crossScalaVersions := Seq(scala2_13, scala3),
libraryDependencies ++= LibDependencies.hmrcMongoTestPlay("play-30", scalaVersion.value)
).dependsOn(hmrcMongoPlay30)
lazy val hmrcMongoMetrixPlay28 = Project("hmrc-mongo-metrix-play-28", file("hmrc-mongo-metrix-play-28"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoMetrixPlay("play-28"),
copyPlay30Sources(hmrcMongoMetrixPlay30)
).dependsOn(hmrcMongoPlay28, hmrcMongoTestPlay28 % Test)
lazy val hmrcMongoMetrixPlay29 = Project("hmrc-mongo-metrix-play-29", file("hmrc-mongo-metrix-play-29"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoMetrixPlay("play-29"),
copyPlay30Sources(hmrcMongoMetrixPlay30)
).dependsOn(hmrcMongoPlay29, hmrcMongoTestPlay29 % Test)
lazy val hmrcMongoMetrixPlay30 = Project("hmrc-mongo-metrix-play-30", file("hmrc-mongo-metrix-play-30"))
.settings(
crossScalaVersions := Seq(scala2_13, scala3),
libraryDependencies ++= LibDependencies.hmrcMongoMetrixPlay("play-30")
).dependsOn(hmrcMongoPlay30, hmrcMongoTestPlay30 % Test)
lazy val hmrcMongoWorkItemRepoPlay28 = Project("hmrc-mongo-work-item-repo-play-28", file("hmrc-mongo-work-item-repo-play-28"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoWorkItemRepoPlay("play-28"),
copyPlay30Sources(hmrcMongoWorkItemRepoPlay30)
).dependsOn(hmrcMongoMetrixPlay28, hmrcMongoTestPlay28 % Test)
lazy val hmrcMongoWorkItemRepoPlay29 = Project("hmrc-mongo-work-item-repo-play-29", file("hmrc-mongo-work-item-repo-play-29"))
.settings(
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.hmrcMongoWorkItemRepoPlay("play-29"),
copyPlay30Sources(hmrcMongoWorkItemRepoPlay30)
).dependsOn(hmrcMongoMetrixPlay29, hmrcMongoTestPlay29 % Test)
lazy val hmrcMongoWorkItemRepoPlay30 = Project("hmrc-mongo-work-item-repo-play-30", file("hmrc-mongo-work-item-repo-play-30"))
.settings(
crossScalaVersions := Seq(scala2_13, scala3),
libraryDependencies ++= LibDependencies.hmrcMongoWorkItemRepoPlay("play-30")
).dependsOn(hmrcMongoMetrixPlay30, hmrcMongoTestPlay30 % Test)