-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sbt
125 lines (114 loc) · 4.45 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
import sbt.Keys._
import de.heikoseeberger.sbtheader.{CommentCreator, CommentStyle, FileType}
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.{HeaderLicense, headerLicense, headerMappings}
name := "geotrellis-pointcloud"
lazy val commonSettings = Seq(
version := Version.geotrellisPointCloud,
scalaVersion := Version.scala,
crossScalaVersions := Version.crossScala,
description := "GeoTrellis PointCloud library",
organization := "com.azavea.geotrellis",
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")),
homepage := Some(url("https://geotrellis.github.io")),
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature",
"-language:implicitConversions",
"-language:reflectiveCalls",
"-language:higherKinds",
"-language:postfixOps",
"-language:existentials",
"-language:experimental.macros",
"-feature",
"-Ypartial-unification", // Required by Cats
"-target:jvm-1.8"
),
publishMavenStyle := true,
Test / publishArtifact := false,
pomIncludeRepository := { _ => false },
bintrayRepository := "geotrellis",
bintrayOrganization := Some("azavea"),
bintrayPackageLabels := Seq("geotrellis", "maps", "gis", "geographic", "data", "raster", "processing", "pdal", "pointcloud"),
bintrayVcsUrl := Some("https://github.com/geotrellis/geotrellis-pointcloud"),
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full),
addCompilerPlugin("org.scalamacros" %% "paradise" % "2.1.1" cross CrossVersion.full),
pomExtra := (
<scm>
<url>[email protected]:geotrellis/geotrellis.git</url>
<connection>scm:git:[email protected]:geotrellis/geotrellis.git</connection>
</scm>
<developers>
<developer>
<id>echeipesh</id>
<name>Eugene Cheipesh</name>
<url>https://github.com/echeipesh/</url>
</developer>
<developer>
<id>lossyrob</id>
<name>Rob Emanuele</name>
<url>https://github.com/lossyrob/</url>
</developer>
<developer>
<id>pomadchin</id>
<name>Grigory Pomadchin</name>
<url>https://github.com/pomadchin/</url>
</developer>
</developers>
),
shellPrompt := { s => Project.extract(s).currentProject.id + " > " },
headerLicense := Some(HeaderLicense.ALv2(java.time.Year.now.getValue.toString, "Azavea")),
headerMappings := Map(
FileType.scala -> CommentStyle.cStyleBlockComment.copy(commentCreator = { (text, existingText) =>
// preserve year of old headers
val newText = CommentStyle.cStyleBlockComment.commentCreator.apply(text, existingText)
existingText.flatMap(_ => existingText.map(_.trim)).getOrElse(newText)
})
),
sources in (Compile, doc) ~= (_ filterNot (_.getAbsolutePath contains "geotrellis/vector")),
resolvers ++= Seq(
"eclipse-releases" at "https://repo.eclipse.org/content/groups/releases",
"eclipse-snapshots" at "https://repo.eclipse.org/content/groups/snapshots",
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
),
Global / cancelable := true,
Test / fork := true,
Test / parallelExecution := false,
Test / connectInput := true,
Test / testOptions += Tests.Argument("-oDF")
)
lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val root = (project in file("."))
.settings(commonSettings)
.aggregate(pointcloud, benchmark)
lazy val pointcloud = project
.settings(name := "geotrellis-pointcloud")
.settings(commonSettings)
.settings(libraryDependencies ++= Dependencies.all)
.settings(
/** https://github.com/lucidworks/spark-solr/issues/179 */
dependencyOverrides ++= {
val deps = Seq(
"com.fasterxml.jackson.core" % "jackson-core" % "2.6.7",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.6.7",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.6.7"
)
CrossVersion.partialVersion(scalaVersion.value) match {
// if Scala 2.12+ is used
case Some((2, scalaMajor)) if scalaMajor >= 12 => deps
case _ => deps :+ "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.6.7"
}
}
)
lazy val benchmark = project
.dependsOn(pointcloud)
.settings(commonSettings)
.settings(noPublishSettings)
.enablePlugins(JmhPlugin)
.settings(name := "benchmark", fork := true, javaOptions += "-Xmx4G")
.settings(libraryDependencies ++= Dependencies.all)