Skip to content

Commit 1cab413

Browse files
authored
Update sbt to 1.5 (#88)
1 parent 16bffa7 commit 1cab413

File tree

5 files changed

+47
-17
lines changed

5 files changed

+47
-17
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ target
33
core/src/pbf_generated/
44
project/project/
55
tmp
6+
.bsp/

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Full documentation at https://simplexspatial.github.io/osm4scala/
2020

2121

2222
## Dev information:
23+
Reminder: Only '+' will trigger cross versions.
24+
2325
### Prepare environment
2426
It's possible to develop using a Windows machine, but all documentation suppose that you are using Linux or Mac.
2527

@@ -35,9 +37,11 @@ PATCH_211=false sbt release
3537

3638
git checkout v1.*.*
3739
PATCH_211=true sbt clean +publish
40+
```
3841

3942
### Publish documentation
4043
```bash
44+
git checkout v1.*.*
4145
export GIT_USER=<username>; export USE_SSH=true; npm run deploy
4246
```
4347

build.sbt

+39-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
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._
227
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
3-
import sbtrelease.ReleasePlugin.autoImport.{releaseCrossBuild, _}
28+
import sbtrelease.ReleasePlugin.autoImport._
429

530
def isPatch211Enable(): Boolean = sys.env.getOrElse("PATCH_211", "false").toBoolean
631

@@ -26,17 +51,17 @@ lazy val commonSettings = Seq(
2651
organization := "com.acervera.osm4scala",
2752
organizationHomepage := Some(url("https://www.acervera.com")),
2853
licenses += ("MIT", url("https://opensource.org/licenses/MIT")),
29-
homepage in ThisBuild := Some(
54+
ThisBuild / homepage := Some(
3055
url(s"https://simplexspatial.github.io/osm4scala/")
3156
),
32-
scmInfo in ThisBuild := Some(
57+
ThisBuild / scmInfo := Some(
3358
ScmInfo(
3459
url("https://github.com/simplexspatial/osm4scala"),
3560
"scm:git:git://github.com/simplexspatial/osm4scala.git",
3661
"scm:git:ssh://github.com:simplexspatial/osm4scala.git"
3762
)
3863
),
39-
developers in ThisBuild := List(
64+
ThisBuild / developers := List(
4065
Developer(
4166
"angelcervera",
4267
"Angel Cervera Claudio",
@@ -49,7 +74,7 @@ lazy val commonSettings = Seq(
4974
"org.scalacheck" %% "scalacheck" % scalacheckVersion % Test,
5075
"commons-io" % "commons-io" % commonIOVersion % Test
5176
),
52-
test in assembly := {},
77+
assembly / test := {},
5378
scalacOptions ++= Seq(
5479
"-target:jvm-1.8",
5580
"-encoding",
@@ -69,12 +94,12 @@ lazy val commonSettings = Seq(
6994
)
7095

7196
lazy val disablingPublishingSettings =
72-
Seq(skip in publish := true, publishArtifact := false)
97+
Seq(publish / skip := true, publishArtifact := false)
7398

7499
lazy val enablingPublishingSettings = Seq(
75100
publishArtifact := true, // Enable publish
76101
publishMavenStyle := true,
77-
publishArtifact in Test := false,
102+
Test / publishArtifact := false,
78103
// Bintray
79104
bintrayPackageLabels := Seq("scala", "osm", "openstreetmap"),
80105
bintrayRepository := "maven",
@@ -102,7 +127,7 @@ def generateSparkFatShadedModule(sparkVersion: String, sparkPrj: Project): Proje
102127
name := s"osm4scala-spark${sparkVersion.head}-shaded",
103128
description := "Spark 2 connector for OpenStreetMap Pbf parser as shaded fat jar.",
104129
bintrayPackage := s"osm4scala-spark${sparkVersion.head}-shaded",
105-
packageBin in Compile := (assembly in (sparkPrj, Compile)).value
130+
Compile / packageBin := (sparkPrj / Compile/ assembly).value
106131
)
107132

108133
def generateSparkModule(sparkVersion: String): Project = {
@@ -137,12 +162,12 @@ def generateSparkModule(sparkVersion: String): Project = {
137162
libraryDependencies ++= Seq(
138163
"org.apache.spark" %% "spark-sql" % sparkVersion % Provided
139164
),
140-
assemblyOption in assembly := (assemblyOption in assembly).value.copy(
165+
assembly / assemblyOption := (assembly / assemblyOption).value.copy(
141166
includeScala = false,
142167
cacheUnzip = false,
143168
cacheOutput = false
144169
),
145-
assemblyShadeRules in assembly := Seq(
170+
assembly / assemblyShadeRules := Seq(
146171
ShadeRule
147172
.rename("com.google.protobuf.**" -> "shadeproto.@1")
148173
.inAll
@@ -222,8 +247,8 @@ lazy val core = Project(id = "core", base = file("core"))
222247
name := "osm4scala-core",
223248
description := "Scala OpenStreetMap Pbf 2 parser. Core",
224249
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
227252
)
228253
)
229254

@@ -234,7 +259,7 @@ lazy val commonUtilities = Project(id = "examples-common-utilities", base = file
234259
.settings(
235260
commonSettings,
236261
exampleSettings,
237-
skip in publish := true,
262+
publish / skip := true,
238263
name := "osm4scala-examples-common-utilities",
239264
description := "Utilities shared by all examples",
240265
libraryDependencies ++= Seq("com.github.scopt" %% "scopt" % scoptVersion)

project/build.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# The MIT License (MIT)
33
#
4-
# Copyright (c) 2017 Ángel Cervera Claudio
4+
# Copyright (c) 2021 Ángel Cervera Claudio
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal
@@ -23,4 +23,4 @@
2323
#
2424
#
2525

26-
sbt.version=1.3.13
26+
sbt.version=1.5.2

version.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version in ThisBuild := "1.0.8-SNAPSHOT"
1+
ThisBuild / version := "1.0.8-SNAPSHOT"

0 commit comments

Comments
 (0)