forked from locationtech/geotrellis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
192 lines (162 loc) · 5.5 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
import sbt.Keys._
ThisBuild / versionScheme := Some("semver-spec")
ThisBuild / scalaVersion := "2.12.16"
ThisBuild / organization := "org.locationtech.geotrellis"
ThisBuild / crossScalaVersions := List("2.12.16", "2.13.8")
lazy val root = Project("geotrellis", file("."))
.aggregate(
accumulo,
`accumulo-spark`,
cassandra,
`cassandra-spark`,
`doc-examples`,
gdal,
`gdal-spark`,
geotools,
hbase,
`hbase-spark`,
layer,
macros,
mdoc,
proj4,
raster,
`raster-testkit`,
s3,
`s3-spark`,
shapefile,
spark,
`spark-pipeline`,
`spark-testkit`,
store,
util,
vector,
`vector-testkit`,
vectortile
)
.enablePlugins(ScalaUnidocPlugin)
.settings(Settings.commonSettings)
.settings(publish / skip := true)
// https://github.com/scalapb/ScalaPB/issues/1350
.settings(ScalaUnidoc / unidoc / unidocProjectFilter := inAnyProject -- inProjects(mdoc, vectortile))
lazy val mdoc = project
.dependsOn(raster)
.enablePlugins(MdocPlugin)
.settings(publish / skip := true)
.settings(Settings.mdoc)
lazy val macros = project
.settings(Settings.macros)
lazy val vectortile = project
.dependsOn(vector)
.settings(Settings.vectortile)
lazy val vector = project
.dependsOn(proj4, util)
.settings(Settings.vector)
.settings(
Test / unmanagedClasspath ++= (LocalProject("vector-testkit") / Compile / fullClasspath).value
)
lazy val `vector-testkit` = project
.dependsOn(vector % Provided)
.settings(Settings.`vector-testkit`)
lazy val proj4 = project
.settings(Settings.proj4)
.settings(javacOptions ++= Seq("-encoding", "UTF-8"))
lazy val raster = project
.dependsOn(util, macros, vector)
.settings(Settings.raster)
.settings(
Test / unmanagedClasspath ++= (LocalProject("raster-testkit") / Compile / fullClasspath).value
)
.settings(
Test / unmanagedClasspath ++= (LocalProject("vector-testkit") / Compile / fullClasspath).value
)
lazy val `raster-testkit` = project
.dependsOn(raster % Provided, vector % Provided)
.settings(Settings.`raster-testkit`)
lazy val spark = project
.dependsOn(util, raster, `raster-testkit` % Test, `vector-testkit` % Test, layer, store)
.settings(Settings.spark)
.settings(
// This takes care of a pseudo-cyclic dependency between the `spark` test scope, `spark-testkit`,
// and `spark` main (compile) scope. sbt is happy with this. IntelliJ requires that `spark-testkit`
// be added to the `spark` module dependencies manually (via "Open Module Settings" context menu for "spark" module).
Test / unmanagedClasspath ++= (LocalProject("spark-testkit") / Compile / fullClasspath).value
)
lazy val `spark-testkit` = project
.dependsOn(`raster-testkit`, spark)
.settings(Settings.`spark-testkit`)
lazy val s3 = project
.dependsOn(store)
.settings(Settings.s3)
lazy val `s3-spark` = project
.dependsOn(
spark % "compile->compile;test->test", // <-- spark-testkit update should simplify this
s3,
`spark-testkit` % Test
)
.settings(Settings.`s3-spark`)
lazy val accumulo = project
.dependsOn(store)
.settings(Settings.accumulo)
lazy val `accumulo-spark` = project
.dependsOn(
`accumulo`,
spark % "compile->compile;test->test", // <-- spark-testkit update should simplify this
`spark-testkit` % Test
)
.settings(Settings.`accumulo-spark`)
lazy val cassandra = project
.dependsOn(store)
.settings(Settings.cassandra)
lazy val `cassandra-spark` = project
.dependsOn(
cassandra,
spark % "compile->compile;test->test", // <-- spark-testkit update should simplify this
`spark-testkit` % Test
)
.settings(Settings.`cassandra-spark`)
lazy val hbase = project
.dependsOn(store)
.settings(projectDependencies := { Seq((store / projectID).value.exclude("com.google.protobuf", "protobuf-java")) })
.settings(Settings.hbase)
lazy val `hbase-spark` = project
.dependsOn(
hbase,
spark % "compile->compile;test->test", // <-- spark-testkit update should simplify this
`spark-testkit` % Test
)
.settings(projectDependencies := { Seq((hbase / projectID).value, (spark / projectID).value.exclude("com.google.protobuf", "protobuf-java")) })
.settings(Settings.`hbase-spark`)
lazy val `spark-pipeline` = project.
dependsOn(spark, `s3-spark`, `spark-testkit` % "test").
settings(Settings.`spark-pipeline`)
lazy val geotools = project
.dependsOn(raster, vector, proj4, `vector-testkit` % Test, `raster-testkit` % Test,
raster % "test->test" // <-- to get rid of this, move `GeoTiffTestUtils` to the testkit.
)
.settings(Settings.geotools)
lazy val shapefile = project
.dependsOn(raster, `raster-testkit` % Test)
.settings(Settings.shapefile)
lazy val util = project
.settings(Settings.util)
lazy val `doc-examples` = project
.dependsOn(spark, `s3-spark`, `accumulo-spark`, `cassandra-spark`, `hbase-spark`, spark, `spark-testkit`, `spark-pipeline`)
.settings(publish / skip := true)
.settings(Settings.`doc-examples`)
lazy val bench = project
.dependsOn(raster, spark)
.enablePlugins(GTBenchmarkPlugin)
.settings(Settings.bench)
lazy val layer = project
.dependsOn(raster, `raster-testkit` % Test)
.settings(Settings.layer)
lazy val store = project
.dependsOn(layer)
.settings(Settings.store)
lazy val gdal = project
.dependsOn(raster, `raster-testkit` % Test)
.settings(Settings.gdal)
lazy val `gdal-spark` = project
.dependsOn(gdal, spark, `spark-testkit` % Test)
.settings(publish / skip := true) // at this point we need this project only for tests
.settings(Settings.`gdal-spark`)