-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
120 lines (107 loc) · 4.09 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
117
118
119
120
lazy val scala213 = "2.13.5"
lazy val scala212 = "2.12.10"
lazy val scala211 = "2.11.12"
lazy val supportedScalaVersions = List(scala213, scala212, scala211)
ThisBuild / organization := "io.onema"
ThisBuild / version := "0.5.0"
ThisBuild / scalaVersion := scala212
ThisBuild / parallelExecution in Test := false
val awsSdkVersion = "1.11.1004"
lazy val uServerless = (project in file("."))
.settings(skip in publish := true)
.aggregate(uServerlessEvents, uServerlessCore, uServerlessDynamoConfig, uServerlessSsmConfig, uServerlessTests)
publishArtifact in uServerless := false
lazy val uServerlessEvents = (project in file("userverless-events"))
.settings(
name := "userverless-events",
commonPublishSettings,
crossScalaVersions := supportedScalaVersions
)
lazy val uServerlessCore = (project in file("userverless-core"))
.settings(
name := "userverless-core",
commonPublishSettings,
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= {
Seq(
// core libs
"io.onema" %% "json-extensions" % "0.5.1",
// AWS libraries
"com.amazonaws" % "aws-lambda-java-events" % "3.8.0",
"com.amazonaws" % "aws-lambda-java-core" % "1.2.1",
// The serverless java-container supports request context authorizer claims that are currently not available in the lambda-java-events
"com.amazonaws.serverless" % "aws-serverless-java-container-core" % "1.5.2",
// Logging
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
"ch.qos.logback" % "logback-classic" % "1.2.0",
"net.logstash.logback" % "logstash-logback-encoder" % "5.3",
)
}
).dependsOn(uServerlessEvents)
lazy val uServerlessDynamoConfig = (project in file("userverless-dynamo-config"))
.settings(
name := "userverless-dynamo-config",
commonPublishSettings,
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= {
Seq(
// AWS libraries
"com.amazonaws" % "aws-java-sdk-dynamodb" % awsSdkVersion,
)
}
).dependsOn(uServerlessCore)
lazy val uServerlessSsmConfig = (project in file("userverless-ssm-config"))
.settings(
name := "userverless-ssm-config",
commonPublishSettings,
crossScalaVersions := supportedScalaVersions,
libraryDependencies ++= {
Seq(
// AWS libraries
"com.amazonaws" % "aws-java-sdk-ssm" % awsSdkVersion,
)
}
).dependsOn(uServerlessCore)
lazy val uServerlessTests = (project in file("userverless-tests"))
.settings(
name := "userverless-tests",
publishTo := Some(Resolver.file("unused repo", file("foo/bar"))),
publishArtifact := false,
libraryDependencies ++= {
Seq(
// Testing
"org.scalatest" %% "scalatest" % "3.1.2" % Test,
"org.scalamock" %% "scalamock" % "4.4.0" % Test
)
},
).dependsOn(uServerlessEvents, uServerlessCore, uServerlessDynamoConfig, uServerlessSsmConfig)
// Maven Central Repo boilerplate config
lazy val commonPublishSettings = Seq(
// publishTo := Some("Onema Snapshots" at "s3://s3-us-east-1.amazonaws.com/ones-deployment-bucket/snapshots"),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://github.com/onema/uServerless")),
scmInfo := Some(
ScmInfo(
url("https://github.com/onema/uServerless"),
"scm:[email protected]:onema/uServerless.git"
)
),
developers := List(
Developer(
id = "onema",
name = "Juan Manuel Torres",
email = "[email protected]",
url = url("https://github.com/onema/")
)
),
publishArtifact in Test := false
)