-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
108 lines (89 loc) · 2.93 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
ThisBuild / organization := "io.s3j"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "3.3.1"
val commonSettings = Seq(
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.15" % Test
),
Compile / scalacOptions ++= Seq("-Xcheck-macros", "-Yno-decode-stacktraces"),
)
val notPublished = Seq(
publishArtifact := false,
publishTo := None,
publish := {},
publishLocal := {}
)
lazy val root = (project in file("."))
.aggregate(runtime, schema, core, `interop-akka`, `interop-jooq`, `interop-sbt`)
.settings(notPublished)
.settings(
name := "s3j-root"
)
lazy val runtime = (project in file("runtime"))
.settings(commonSettings)
.settings(
name := "s3j-runtime"
)
lazy val `core-internal` = (project in file("core-internal"))
.dependsOn(runtime)
.settings(commonSettings, notPublished)
.settings(
name := "s3j-core-internal",
libraryDependencies ++= Seq(
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value % Provided
)
)
lazy val schema = (project in file("schema"))
.dependsOn(runtime, `core-internal` % "compile-internal, test-internal")
.settings(commonSettings)
.settings(
name := "s3j-schema"
)
lazy val core = (project in file("core"))
.dependsOn(runtime, schema)
.settings(commonSettings)
.settings(
name := "s3j",
libraryDependencies ++= Seq(
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value % Provided
)
)
// noinspection SbtDependencyVersionInspection
lazy val `interop-akka` = (project in file("interop/akka"))
.dependsOn(runtime)
.settings(commonSettings)
.settings(
name := "s3j-akka",
libraryDependencies ++= Seq(
// Apache 2 licensed versions:
"com.typesafe.akka" %% "akka-stream" % "2.6.20",
"com.typesafe.akka" %% "akka-http" % "10.2.10"
).map(_.cross(CrossVersion.for3Use2_13))
)
lazy val `interop-jooq` = (project in file("interop/jooq"))
.dependsOn(runtime, core % Test)
.settings(commonSettings)
.settings(
name := "s3j-jooq",
libraryDependencies ++= Seq(
"org.jooq" % "jooq" % "3.18.0",
"org.testcontainers" % "postgresql" % "1.19.2" % Test,
"org.postgresql" % "postgresql" % "42.5.4" % Test
)
)
lazy val `interop-sbt` = (project in file("interop/sbt-plugin"))
.enablePlugins(BuildInfoPlugin, SbtPlugin)
.settings(
name := "s3j-sbt",
scalaVersion := "2.12.16",
crossScalaVersions := Seq(scalaVersion.value),
buildInfoKeys := Seq(organization, version),
buildInfoPackage := "s3j",
buildInfoObject := "S3jBuildInfo",
buildInfoOptions += BuildInfoOption.PackagePrivate
)
def exampleProject(exampleName: String): Project = Project("example-" + exampleName, file("examples/" + exampleName))
.dependsOn(core)
.settings(commonSettings, notPublished)
.settings(name := "s3j-example-" + exampleName)
lazy val exampleCustomPlugin = exampleProject("custom-plugin").dependsOn(schema)