This repository has been archived by the owner on Mar 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
154 lines (144 loc) · 4.53 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
lazy val commonSettings = Seq(
organization := "com.itv.chuckwagon",
scalaVersion := "2.12.8",
description := "A framework for writing and deploying Scala AWS Lambda Functions",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.1" % Test
),
publishArtifact in (Compile, packageDoc) := true
)
sonatypeProfileName := "com.itv"
lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact := true,
publishArtifact in Test := false,
licenses := Seq("ITV-OSS" -> url("http://itv.com/itv-oss-licence-v1.0")),
homepage := Some(url("http://io.itv.com/chuckwagon/")),
scmInfo := Some(
ScmInfo(
url("https://github.com/itv/chuckwagon"),
"scm:git:git@github.com:itv/chuckwagon.git"
)
),
pomExtra :=
<developers>
<developer>
<id>caoilte</id>
<name>Caoilte O'Connor</name>
<url>http://caoilte.org</url>
</developer>
</developers>
)
val awsSdkVersion = "1.11.119"
val circeVersion = "0.10.0"
val slf4jVersion = "1.7.25"
lazy val root = (project in file("."))
.settings(
name := "chuckwagon"
)
.settings(noPublishSettings)
.aggregate(
`aws-scala-sdk`,
`jvm`,
`test-fixtures`,
`sbt-chuckwagon`
)
lazy val `aws-scala-sdk` = project
.settings(
publishSettings ++
commonSettings ++
Seq(
moduleName := "chuckwagon-aws-scala-sdk",
libraryDependencies ++= Seq(
"com.amazonaws" % "aws-java-sdk-iam" % awsSdkVersion,
"com.amazonaws" % "aws-java-sdk-lambda" % awsSdkVersion,
"com.amazonaws" % "aws-java-sdk-s3" % awsSdkVersion,
"com.amazonaws" % "aws-java-sdk-ec2" % awsSdkVersion,
"com.amazonaws" % "aws-java-sdk-events" % awsSdkVersion,
"com.amazonaws" % "aws-java-sdk-sts" % awsSdkVersion,
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"org.typelevel" %% "cats-free" % "1.5.0",
"org.scala-lang" % "scala-reflect" % scalaVersion.value // for macro paradise, for circe generic parsing
),
addCompilerPlugin(("org.scalamacros" % "paradise" % "2.1.0").cross(CrossVersion.full))
)
)
lazy val `jvm` = project
.settings(
publishSettings ++
commonSettings ++
Seq(
moduleName := "chuckwagon-jvm",
libraryDependencies ++= Seq(
"com.amazonaws" % "aws-lambda-java-core" % "1.1.0" % Provided,
"com.amazonaws" % "aws-lambda-java-events" % "1.3.0" % Provided,
"com.amazonaws" % "aws-lambda-java-log4j" % "1.0.0",
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"org.slf4j" % "slf4j-api" % slf4jVersion,
"org.slf4j" % "slf4j-log4j12" % slf4jVersion
)
)
)
lazy val `test-fixtures` = project
.settings(noPublishSettings)
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"com.lihaoyi" %% "pprint" % "0.5.3",
"com.lihaoyi" %% "ammonite-ops" % "1.4.4"
)
)
.dependsOn(`aws-scala-sdk`)
lazy val `sbt-chuckwagon` = project
.settings(
publishSettings ++
commonSettings ++
Seq(
sbtPlugin := true,
libraryDependencies ++= Seq(
"com.lihaoyi" %% "fansi" % "0.2.3"
),
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
)
)
.dependsOn(`aws-scala-sdk`)
releaseCrossBuild := false
import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommandAndRemaining("sonatypeReleaseAll"),
pushChanges
)
lazy val readme = scalatex
.ScalatexReadme(
projectId = "readme",
wd = file(""),
url = "https://github.com/itv/chuckwagon/tree/master",
source = "Readme"
)
.settings(commonSettings)
.settings(
noPublishSettings,
test := {
run.in(Compile).toTask(" --validate-links").value
},
scalacOptions := scalacOptions.value.filter(_ != "-P:acyclic:force").filter(_ != "-Xlint")
)