forked from seratch/AWScala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
129 lines (120 loc) · 4.11 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
import xerial.sbt.Sonatype.autoImport._
lazy val commonSettings = Seq(
organization := "com.github.seratch",
name := "awscala",
version := "0.8.4-SNAPSHOT",
scalaVersion := "2.13.1",
crossScalaVersions := Seq("2.12.10", "2.13.1"),
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>git@github.com:seratch/awscala.git</url>
<connection>scm:git:git@github.com: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.693"
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.3",
"org.joda" % "joda-convert" % "2.2.1",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.1",
"org.bouncycastle" % "bcprov-jdk16" % "1.46" % "provided",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "test",
"org.scalatest" %% "scalatest" % "3.0.8" % "test"
)
)
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.0.8" % "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")
}