-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathbuild.sbt
133 lines (119 loc) · 3.96 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
val geolatteGeomVersion = "1.8.1"
val commonResolvers = Seq(
Resolver.mavenLocal,
"Typesafe Repository" at "https://repo.typesafe.com/typesafe/releases/"
)
val publishSettings = Seq(
publishMavenStyle := true,
pomIncludeRepository := { _ =>
false
},
sonatypeProfileName := "org.geolatte",
publishTo := sonatypePublishToBundle.value,
pomExtra := pomInfo,
credentials ++= publishingCredentials
)
lazy val disablePublishingRoot = Seq(
Keys.publishLocal := {},
Keys.publish := {},
publish / skip := true
)
val commonSettings = Seq(
organization := "org.geolatte",
version := geolatteGeomVersion,
scalaVersion := "2.13.2",
updateOptions := updateOptions.value.withLatestSnapshots(false),
resolvers ++= commonResolvers,
scalacOptions ++= Seq("-language:implicitConversions"),
scalacOptions in Test ++= Seq("-Yrangepos", "--explain-types"),
Test / publishArtifact := true
) ++ publishSettings
val Specs2Version = "4.9.4"
val CirceVersion = "0.13.0"
val jacksonVersion = "2.11.0"
val scalaCheckVersion = "1.14.3"
val scalaTestVersion = "3.1.2"
val commonDependencies = Seq(
"org.geolatte" % "geolatte-geom" % geolatteGeomVersion,
"org.scalatest" %% "scalatest" % scalaTestVersion % "test",
"org.specs2" %% "specs2-core" % Specs2Version % "test"
)
lazy val geom = (project in file("geom")).settings(
commonSettings,
name := "geolatte-geom-scala",
libraryDependencies ++= commonDependencies
)
lazy val playJson28 = (project in file("play-json-28"))
.settings(
commonSettings,
name := "geolatte-geom-playjson28",
libraryDependencies ++=
commonDependencies ++ Seq(
"com.typesafe.play" %% "play-json" % "2.8.1",
"org.geolatte" % "geolatte-geojson" % geolatteGeomVersion % "test"
)
)
.dependsOn(geom)
lazy val circeGeoJson = (project in file("circe-geojson"))
.settings(
commonSettings,
name := "geolatte-geom-circe",
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat,
libraryDependencies ++= commonDependencies ++ Seq(
"io.circe" %% "circe-generic" % CirceVersion withJavadoc (),
"org.specs2" %% "specs2-core" % Specs2Version % "test" withJavadoc (),
"org.geolatte" % "geolatte-geojson" % geolatteGeomVersion % "test",
"io.circe" %% "circe-parser" % CirceVersion % "test" withJavadoc (),
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test",
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion % "test"
)
)
.dependsOn(geom)
lazy val slick = (project in file("slick"))
.settings(
commonSettings,
name := "geolatte-geom-slick",
libraryDependencies ++= commonDependencies ++ Seq(
"com.github.tminglei" %% "slick-pg" % "0.19.0",
"com.typesafe.slick" %% "slick" % "3.3.2"
)
)
.dependsOn(geom)
lazy val root = (project in file(".")).settings(
commonSettings ++ disablePublishingRoot,
name := "geom-scala",
crossScalaVersions := Nil
).aggregate(
geom,
playJson28,
circeGeoJson,
slick
)
lazy val pomInfo = <url>https://github.com/geolatte/geolatte-geom</url>
<licenses>
<license>
<name>LGPL</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.en.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:geolatte/geolatte-geom.git</url>
<connection>scm:git@github.com:geolatte/geolatte-geom.git</connection>
</scm>
<developers>
<developer>
<id>Geolatte</id>
<name>Geolatte group</name>
<url>http://github.com/geolatte</url>
</developer>
</developers>
val publishingCredentials = (for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
} yield
Seq(
Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
username,
password))).getOrElse(Seq())