-
Notifications
You must be signed in to change notification settings - Fork 32
/
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.18", "1.2.8"),
scalaVersion := {
(sbtBinaryVersion in pluginCrossBuild).value match {
case "0.13" => "2.10.7"
case _ => "2.12.8"
}
},
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(
"org.scalameta" %% "scalameta" % "4.1.9",
"io.swagger" % "swagger-parser" % "1.0.44"
)
)
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>
}
)