forked from fralken/sbt-swagger-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
82 lines (77 loc) · 2.29 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
import sbt.Keys.crossSbtVersions
import xerial.sbt.Sonatype.sonatypeSettings
lazy val common = Seq(
organization := "eu.unicredit",
version := "0.1.0-SNAPSHOT",
crossSbtVersions := List("0.13.16", "1.0.4"),
scalaVersion := {
(sbtBinaryVersion in pluginCrossBuild).value match {
case "0.13" => "2.10.6"
case _ => "2.12.4"
}
},
scalacOptions ++= Seq("-feature", "-deprecation", "-language:_"),
resolvers += Resolver.sonatypeRepo("releases")
) ++ sonatypePublish
lazy val lib = project
.in(file("lib"))
.settings(common)
.settings(
name := """sbt-swagger-codegen-lib""",
libraryDependencies ++= Seq(
"com.eed3si9n" %% "treehugger" % "0.4.3",
"io.swagger" % "swagger-parser" % "1.0.27"
)
)
lazy val plugin = project
.in(file("plugin"))
.settings(common)
.settings(
name := """sbt-swagger-codegen""",
sbtPlugin := true
)
.dependsOn(lib)
lazy val root = project
.in(file("."))
.settings(common)
.settings(
skip in publish := true
)
.aggregate(lib, plugin)
lazy val sonatypePublish = sonatypeSettings ++ Seq(
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
publishTo := Some(sonatypeDefaultResolver.value),
credentials += Credentials(Path.userHome / ".ivy2" / "sonatype.credentials"),
pomExtra := {
<url>https://github.com/unicredit/sbt-swagger-codegen</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:github.com/unicredit/sbt-swagger-codegen</connection>
<developerConnection>scm:git:[email protected]:unicredit/sbt-swagger-codegen</developerConnection>
<url>github.com/unicredit/sbt-swagger-codegen</url>
</scm>
<developers>
<developer>
<id>andreaTP</id>
<name>Andrea Peruffo</name>
<url>https://github.com/andreaTP/</url>
</developer>
<developer>
<id>fralken</id>
<name>Francesco Montecuccoli Degli Erri</name>
<url>https://github.com/fralken/</url>
</developer>
<developer>
<id>mfirry</id>
<name>Marco Firrincieli</name>
<url>https://github.com/mfirry/</url>
</developer>
</developers>
}
)