This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
136 lines (122 loc) · 4.26 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
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
import xerial.sbt.Sonatype.autoImport._
val releaseSettings = Seq(
releaseCrossBuild := true,
releaseTagName := { (version in ThisBuild).value },
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("^ publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
)
val aws4sVersion = "1.0.16"
val sisiohConfigVersion = "0.0.15"
val sbtCrossVersion = sbtVersion in pluginCrossBuild
lazy val baseSettings = Seq(
scalaVersion := (CrossVersion partialVersion sbtCrossVersion.value match {
case Some((0, 13)) => "2.10.6"
case Some((1, _)) => "2.12.4"
case _ => sys error s"Unhandled sbt version ${sbtCrossVersion.value}"
}),
sonatypeProfileName := "com.chatwork",
organization := "com.chatwork",
shellPrompt := {
"sbt (%s)> " format projectId(_)
},
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo := sonatypePublishTo.value,
pomIncludeRepository := {
_ => false
},
pomExtra := {
<url>https://github.com/chatwork/sbt-aws</url>
<licenses>
<license>
<name>The MIT License</name>
<url>http://opensource.org/licenses/MIT</url>
</license>
</licenses>
<scm>
<url>[email protected]:chatwork/sbt-aws.git</url>
<connection>scm:git:github.com/chatwork/sbt-aws</connection>
<developerConnection>scm:git:[email protected]:chatwork/sbt-aws.git</developerConnection>
</scm>
<developers>
<developer>
<id>cw-junichikato</id>
<name>Junichi Kato</name>
</developer>
</developers>
},
credentials += Credentials((baseDirectory in LocalRootProject).value / ".credentials"),
scalacOptions -= "-Ybackend:GenBCode"
)
lazy val pluginSettings = baseSettings ++ releaseSettings ++ Seq(
sbtPlugin := true,
crossSbtVersions := Seq("0.13.16", "1.0.4"),
resolvers ++= Seq(
"Sonatype OSS Snapshot Repository" at "https://oss.sonatype.org/content/repositories/snapshots/",
"Sonatype OSS Release Repository" at "https://oss.sonatype.org/content/repositories/releases/",
"Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/"
),
libraryDependencies ++= Seq(
),
scriptedBufferLog := false,
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dproject.version=" + version.value)
},
scriptedBufferLog := false
)
lazy val core = (project in file("sbt-aws-core")).settings(pluginSettings: _*).settings(
name := "sbt-aws-core",
libraryDependencies ++= Seq(
"org.sisioh" %% "sisioh-config" % sisiohConfigVersion,
"org.sisioh" %% "aws4s-core" % aws4sVersion,
"commons-io" % "commons-io" % "2.4"
)
)
lazy val s3 = (project in file("sbt-aws-s3")).settings(pluginSettings: _*).settings(
name := "sbt-aws-s3",
libraryDependencies ++= Seq(
"org.sisioh" %% "aws4s-s3" % aws4sVersion
)
).dependsOn(core)
lazy val s3Resolver = (project in file("sbt-aws-s3-resolver")).settings(pluginSettings: _*).settings(
name := "sbt-aws-s3-resolver",
libraryDependencies ++= Seq(
"org.apache.ivy" % "ivy" % "2.4.0",
"io.get-coursier" %% "coursier" % "1.0.0-RC3",
"io.get-coursier" %% "coursier-cache" % "1.0.0-RC3",
"org.slf4j" % "slf4j-api" % "1.7.25",
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
).dependsOn(s3)
lazy val eb = (project in file("sbt-aws-eb")).settings(pluginSettings: _*).settings(
name := "sbt-aws-eb",
libraryDependencies ++= Seq(
"org.sisioh" %% "aws4s-eb" % aws4sVersion,
"org.freemarker" % "freemarker" % "2.3.23"
)
).dependsOn(s3)
lazy val cfn = (project in file("sbt-aws-cfn")).settings(pluginSettings: _*).settings(
name := "sbt-aws-cfn",
libraryDependencies ++= Seq(
"org.sisioh" %% "aws4s-cfn" % aws4sVersion
)
).dependsOn(s3)
lazy val root = (project in file(".")).settings(pluginSettings: _*).settings(
name := "sbt-aws"
).aggregate(core, s3, eb, cfn, s3Resolver)
def projectId(state: State) = extracted(state).currentProject.id
def extracted(state: State) = Project extract state