1
- import sbt .Keys .{baseDirectory , _ }
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2021 Ángel Cervera Claudio
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ *
24
+ */
25
+
26
+ import sbt .Keys ._
2
27
import sbtrelease .ReleasePlugin .autoImport .ReleaseTransformations ._
3
- import sbtrelease .ReleasePlugin .autoImport .{ releaseCrossBuild , _ }
28
+ import sbtrelease .ReleasePlugin .autoImport ._
4
29
5
30
def isPatch211Enable (): Boolean = sys.env.getOrElse(" PATCH_211" , " false" ).toBoolean
6
31
@@ -26,17 +51,17 @@ lazy val commonSettings = Seq(
26
51
organization := " com.acervera.osm4scala" ,
27
52
organizationHomepage := Some (url(" https://www.acervera.com" )),
28
53
licenses += (" MIT" , url(" https://opensource.org/licenses/MIT" )),
29
- homepage in ThisBuild := Some (
54
+ ThisBuild / homepage := Some (
30
55
url(s " https://simplexspatial.github.io/osm4scala/ " )
31
56
),
32
- scmInfo in ThisBuild := Some (
57
+ ThisBuild / scmInfo := Some (
33
58
ScmInfo (
34
59
url(" https://github.com/simplexspatial/osm4scala" ),
35
60
" scm:git:git://github.com/simplexspatial/osm4scala.git" ,
36
61
" scm:git:ssh://github.com:simplexspatial/osm4scala.git"
37
62
)
38
63
),
39
- developers in ThisBuild := List (
64
+ ThisBuild / developers := List (
40
65
Developer (
41
66
" angelcervera" ,
42
67
" Angel Cervera Claudio" ,
@@ -49,7 +74,7 @@ lazy val commonSettings = Seq(
49
74
" org.scalacheck" %% " scalacheck" % scalacheckVersion % Test ,
50
75
" commons-io" % " commons-io" % commonIOVersion % Test
51
76
),
52
- test in assembly := {},
77
+ assembly / test := {},
53
78
scalacOptions ++= Seq (
54
79
" -target:jvm-1.8" ,
55
80
" -encoding" ,
@@ -69,12 +94,12 @@ lazy val commonSettings = Seq(
69
94
)
70
95
71
96
lazy val disablingPublishingSettings =
72
- Seq (skip in publish := true , publishArtifact := false )
97
+ Seq (publish / skip := true , publishArtifact := false )
73
98
74
99
lazy val enablingPublishingSettings = Seq (
75
100
publishArtifact := true , // Enable publish
76
101
publishMavenStyle := true ,
77
- publishArtifact in Test := false ,
102
+ Test / publishArtifact := false ,
78
103
// Bintray
79
104
bintrayPackageLabels := Seq (" scala" , " osm" , " openstreetmap" ),
80
105
bintrayRepository := " maven" ,
@@ -102,7 +127,7 @@ def generateSparkFatShadedModule(sparkVersion: String, sparkPrj: Project): Proje
102
127
name := s " osm4scala-spark ${sparkVersion.head}-shaded " ,
103
128
description := " Spark 2 connector for OpenStreetMap Pbf parser as shaded fat jar." ,
104
129
bintrayPackage := s " osm4scala-spark ${sparkVersion.head}-shaded " ,
105
- packageBin in Compile := (assembly in ( sparkPrj, Compile ) ).value
130
+ Compile / packageBin := (sparkPrj / Compile / assembly ).value
106
131
)
107
132
108
133
def generateSparkModule (sparkVersion : String ): Project = {
@@ -137,12 +162,12 @@ def generateSparkModule(sparkVersion: String): Project = {
137
162
libraryDependencies ++= Seq (
138
163
" org.apache.spark" %% " spark-sql" % sparkVersion % Provided
139
164
),
140
- assemblyOption in assembly := (assemblyOption in assembly ).value.copy(
165
+ assembly / assemblyOption := (assembly / assemblyOption ).value.copy(
141
166
includeScala = false ,
142
167
cacheUnzip = false ,
143
168
cacheOutput = false
144
169
),
145
- assemblyShadeRules in assembly := Seq (
170
+ assembly / assemblyShadeRules := Seq (
146
171
ShadeRule
147
172
.rename(" com.google.protobuf.**" -> " shadeproto.@1" )
148
173
.inAll
@@ -222,8 +247,8 @@ lazy val core = Project(id = "core", base = file("core"))
222
247
name := " osm4scala-core" ,
223
248
description := " Scala OpenStreetMap Pbf 2 parser. Core" ,
224
249
bintrayPackage := " osm4scala-core" ,
225
- PB .targets in Compile := Seq (
226
- scalapb.gen(grpc = false ) -> (sourceManaged in Compile ).value
250
+ Compile / PB .targets := Seq (
251
+ scalapb.gen(grpc = false ) -> (Compile / sourceManaged ).value
227
252
)
228
253
)
229
254
@@ -234,7 +259,7 @@ lazy val commonUtilities = Project(id = "examples-common-utilities", base = file
234
259
.settings(
235
260
commonSettings,
236
261
exampleSettings,
237
- skip in publish := true ,
262
+ publish / skip := true ,
238
263
name := " osm4scala-examples-common-utilities" ,
239
264
description := " Utilities shared by all examples" ,
240
265
libraryDependencies ++= Seq (" com.github.scopt" %% " scopt" % scoptVersion)
0 commit comments