forked from seratch/AWScala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
128 lines (119 loc) · 4.16 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
import xerial.sbt.Sonatype.autoImport._
lazy val commonSettings = Seq(
organization := "com.github.seratch",
name := "awscala",
version := "0.8.6-SNAPSHOT",
scalaVersion := "2.13.4",
crossScalaVersions := Seq("2.12.13", "2.13.4"),
sbtPlugin := false,
transitiveClassifiers in Global := Seq(Artifact.SourceClassifier),
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature"),
publishTo := _publishTo(version.value),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra := <url>https://github.com/seratch/awscala</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:seratch/awscala.git</url>
<connection>scm:git:[email protected]:seratch/awscala.git</connection>
</scm>
<developers>
<developer>
<id>seratch</id>
<name>Kazuhiro Sera</name>
<url>http://seratch.net/</url>
</developer>
<developer>
<id>mslinn</id>
<name>Mike Slinn</name>
<url>https://github.com/mslinn</url>
</developer>
<developer>
<id>Rheeseyb</id>
<name>RheeseyB</name>
<url>https://github.com/Rheeseyb</url>
</developer>
<developer>
<id>gribeiro</id>
<name>Georges Kovacs Ribeiro</name>
<url>https://github.com/gribeiro</url>
</developer>
</developers>,
organization := "com.github.seratch",
sonatypeProfileName := "com.github.seratch"
)
lazy val awsJavaSdkVersion = "1.11.954"
lazy val all = (project in file("."))
.settings(commonSettings)
.settings(
moduleName := "awscala"
)
.aggregate(core, dynamodb, ec2, emr, iam, redshift, s3, simpledb, sqs, sts, stepfunctions)
.dependsOn(core, dynamodb, ec2, emr, iam, redshift, s3, simpledb, sqs, sts, stepfunctions)
lazy val core = project
.in(file("core"))
.settings(commonSettings)
.settings(
moduleName := "awscala-core",
libraryDependencies ++= Seq(
"com.amazonaws" % "aws-java-sdk-core" % awsJavaSdkVersion,
"joda-time" % "joda-time" % "2.10.10",
"org.joda" % "joda-convert" % "2.2.1",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.4.1",
"org.bouncycastle" % "bcprov-jdk16" % "1.46" % "provided",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "test",
"org.scalatest" %% "scalatest" % "3.2.3" % "test",
"org.scala-lang" % "scala-reflect" % "2.13.4"
)
)
lazy val ec2 = awsProject("ec2")
.settings(
libraryDependencies ++= Seq(
"com.decodified" %% "scala-ssh" % "0.10.0" % "provided"
)
)
lazy val iam = awsProject("iam")
lazy val dynamodb = awsProject("dynamodb").settings(dynamoTestSettings)
lazy val emr = awsProject("emr").dependsOn(ec2 % "test")
lazy val redshift = awsProject("redshift")
lazy val s3 = awsProject("s3")
lazy val simpledb = awsProject("simpledb")
lazy val sqs = awsProject("sqs")
lazy val sts = awsProject("sts")
lazy val stepfunctions = awsProject("stepfunctions").dependsOn(iam % "test")
def awsProject(service: String) = {
Project
.apply(service, file(service))
.settings(commonSettings)
.settings(
moduleName := s"awscala-$service",
libraryDependencies ++= Seq(
"com.amazonaws" % s"aws-java-sdk-$service" % awsJavaSdkVersion,
"ch.qos.logback" % "logback-classic" % "1.2.3" % "test",
"org.scalatest" %% "scalatest" % "3.2.3" % "test"
)
)
.dependsOn(core)
}
lazy val dynamoTestSettings = Seq(
dynamoDBLocalDownloadDir := file(".dynamodb-local"),
dynamoDBLocalPort := 8000,
startDynamoDBLocal := startDynamoDBLocal.dependsOn(compile in Test).value,
test in Test := (test in Test).dependsOn(startDynamoDBLocal).value,
testOptions in Test += dynamoDBLocalTestCleanup.value,
parallelExecution in Test := false
)
def _publishTo(v: String) = {
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}