Skip to content

Commit 6cf3010

Browse files
Update sbt to 2.0.1 (#634)
1 parent ea09073 commit 6cf3010

15 files changed

Lines changed: 146 additions & 188 deletions

File tree

.ci_scripts/validate.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ fi
7676

7777
export _JAVA_OPTIONS="$JVM_OPTS"
7878

79+
export JDK_JAVA_OPTIONS="--add-opens java.base/java.lang=ALL-UNNAMED"
80+
7981
SBT_OPTS="++$SCALA_VERSION"
8082

8183
# Scalariform check
@@ -95,7 +97,7 @@ fi
9597
"${SBT_CMD_PREFIX[@]}" "$SBT_OPTS" ';error ;scalafmtCheckAll ;scalafmtSbtCheck'
9698

9799
# MiMa, Tests
98-
SBT_CMD=";error ;test:compile ;doc ;mimaReportBinaryIssues; info"
100+
SBT_CMD=";error ;Test/compile ;doc ;mimaReportBinaryIssues; info"
99101

100102
if [ "x$SBT_TEST_PROJECTS" = "x" ]; then
101103
SBT_CMD="$SBT_CMD ;testQuick -- stopOnFail"

.circleci/config.yml

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ commands:
66
parameters:
77
sbt_version:
88
type: string
9-
default: "1.11.4"
9+
default: "2.0.1"
1010
steps:
1111
- restore_cache:
1212
keys:
@@ -67,14 +67,14 @@ commands:
6767
exit 1
6868
6969
build_n_test:
70-
description: Build & Run tests
70+
description: 'Build & Run tests'
7171
parameters:
7272
variant:
7373
type: string
7474
default: ""
7575
java_version:
7676
type: string
77-
default: "openjdk8"
77+
default: "openjdk26"
7878
scala_version:
7979
type: string
8080
default: "2.13"
@@ -159,7 +159,7 @@ commands:
159159
default: ""
160160
java_version:
161161
type: string
162-
default: "openjdk8"
162+
default: "openjdk26"
163163
scala_version:
164164
type: string
165165
default: "2.13"
@@ -214,7 +214,7 @@ commands:
214214

215215
- run:
216216
name: Build example << parameters.module >>
217-
command: cd examples && sbt +test:compile
217+
command: cd examples && sbt +Test/compile
218218

219219
- save_cache:
220220
paths:
@@ -285,9 +285,9 @@ commands:
285285
jobs:
286286
# --- Common tests --- #
287287

288-
common_scala211_jdk8:
288+
common_scala211_jdk26:
289289
docker:
290-
- image: cimg/openjdk:8.0
290+
- image: cimg/openjdk:26.0
291291

292292
working_directory: ~/repo
293293

@@ -300,9 +300,9 @@ jobs:
300300
play_json_version: 2.6.7
301301
variant: Play 2.6, WS 1.1
302302

303-
common_scala212_play27_jdk8:
303+
common_scala212_play27_jdk26:
304304
docker:
305-
- image: cimg/openjdk:8.0
305+
- image: cimg/openjdk:26.0
306306

307307
working_directory: ~/repo
308308

@@ -323,15 +323,14 @@ jobs:
323323
play_json_version: 2.9.1
324324
variant: Play 2.7, WS 2.0
325325

326-
common_scala213_play28_jdk9:
326+
common_scala213_play28_jdk26:
327327
docker:
328-
- image: circleci/openjdk:9-jdk
328+
- image: cimg/openjdk:26.0
329329

330330
working_directory: ~/repo
331331

332332
steps:
333333
- test_suite:
334-
java_version: openjdk9
335334
modules: core vfs play
336335
scala_version: "2.13"
337336
ws_version: 2.0.6
@@ -340,7 +339,6 @@ jobs:
340339
variant: Play 2.7, WS 2.0
341340

342341
- test_suite:
343-
java_version: openjdk9
344342
modules: core vfs play
345343
scala_version: "2.13"
346344
ws_version: 2.1.2
@@ -358,17 +356,17 @@ jobs:
358356
- test_suite:
359357
java_version: openjdk17
360358
modules: core vfs play
361-
scala_version: 3.8.4
359+
scala_version: 3.4.3
362360
ws_version: 2.2.11
363361
play_version: 2.9.5
364362
play_json_version: 2.10.6
365363
variant: Play 2.9, WS 2.2
366364

367365
# --- Integration: S3/Google --- #
368366

369-
int_scala211_jdk8:
367+
int_scala211_jdk26:
370368
docker:
371-
- image: cimg/openjdk:8.0
369+
- image: cimg/openjdk:26.0
372370
- image: minio/minio:RELEASE.2024-11-07T00-52-20Z
373371
environment:
374372
MINIO_ROOT_USER: minioadmin
@@ -423,9 +421,9 @@ jobs:
423421
play_json_version: 2.6.7
424422
variant: Play 2.6, WS 1.1
425423

426-
int_scala212_play27_jdk8:
424+
int_scala212_play27_jdk26:
427425
docker:
428-
- image: cimg/openjdk:8.0
426+
- image: cimg/openjdk:26.0
429427
- image: minio/minio:RELEASE.2024-11-07T00-52-20Z
430428
environment:
431429
MINIO_ROOT_USER: minioadmin
@@ -540,15 +538,15 @@ jobs:
540538
- test_suite:
541539
java_version: openjdk17
542540
modules: s3 google
543-
scala_version: 3.8.4
541+
scala_version: 3.4.3
544542
ws_version: 2.2.11
545543
play_version: 2.9.5
546544
play_json_version: 2.10.6
547545
variant: Play 2.9, WS 2.2
548546

549-
gridfs_scala212_play27_jdk8:
547+
gridfs_scala212_play27_jdk26:
550548
docker:
551-
- image: cimg/openjdk:8.0
549+
- image: cimg/openjdk:26.0
552550
- image: mongo:8.0.3
553551

554552
working_directory: ~/repo
@@ -581,7 +579,7 @@ jobs:
581579
name: Build and Test GridFS (Scala 2.12)
582580
command: |
583581
export PATH="$HOME/sbt/bin:$PATH"
584-
sbt -J-Xmx4g "++ 2.12.18; gridfs/test"
582+
sbt -J-Xmx4g "++ 2.12.21; gridfs/test"
585583
586584
- save_cache:
587585
paths:
@@ -593,7 +591,7 @@ jobs:
593591

594592
publish_snapshots:
595593
docker:
596-
- image: cimg/openjdk:8.0
594+
- image: cimg/openjdk:26.0
597595

598596
working_directory: ~/repo
599597

@@ -631,7 +629,7 @@ jobs:
631629
ws_version: 2.2.11
632630
play_version: 2.9.5
633631
play_json_version: 2.10.6
634-
scala_versions: "3.8.4"
632+
scala_versions: "3.4.3"
635633
# TODO: play29
636634

637635
- publish_snapshots:
@@ -650,7 +648,7 @@ jobs:
650648

651649
examples:
652650
docker:
653-
- image: cimg/openjdk:11.0
651+
- image: cimg/openjdk:26.0
654652

655653
working_directory: ~/repo
656654

@@ -667,28 +665,28 @@ workflows:
667665
main_suite:
668666
jobs:
669667
# Common
670-
- common_scala211_jdk8
671-
- common_scala212_play27_jdk8
672-
- common_scala213_play28_jdk9
668+
- common_scala211_jdk26
669+
- common_scala212_play27_jdk26
670+
- common_scala213_play28_jdk26
673671
- common_scala3_play29_jdk17
674672

675673
# S3/Google
676-
- int_scala211_jdk8:
674+
- int_scala211_jdk26:
677675
requires:
678-
- common_scala211_jdk8
679-
- int_scala212_play27_jdk8:
676+
- common_scala211_jdk26
677+
- int_scala212_play27_jdk26:
680678
requires:
681-
- common_scala212_play27_jdk8
682-
- int_scala211_jdk8
679+
- common_scala212_play27_jdk26
680+
- int_scala211_jdk26
683681
- int_scala3_play29_jdk17:
684682
requires:
685683
- common_scala3_play29_jdk17
686-
- int_scala212_play27_jdk8
684+
- int_scala212_play27_jdk26
687685

688686
# GridFS
689-
- gridfs_scala212_play27_jdk8:
687+
- gridfs_scala212_play27_jdk26:
690688
requires:
691-
- common_scala212_play27_jdk8
689+
- common_scala212_play27_jdk26
692690

693691
# Master
694692
- publish_snapshots:
@@ -697,10 +695,10 @@ workflows:
697695
only:
698696
- master
699697
requires:
700-
- int_scala211_jdk8
701-
- int_scala212_play27_jdk8
698+
- int_scala211_jdk26
699+
- int_scala212_play27_jdk26
702700
- int_scala3_play29_jdk17
703-
- gridfs_scala212_play27_jdk8
701+
- gridfs_scala212_play27_jdk26
704702

705703
- examples:
706704
filters:

build.sbt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lazy val core = project
1414
.settings(
1515
name := "benji-core",
1616
Compile / compile / scalacOptions ++= {
17-
if (scalaBinaryVersion.value startsWith "3") {
17+
if (scalaBinaryVersion.value.startsWith("3")) {
1818
Seq("-language:higherKinds")
1919
} else if (scalaBinaryVersion.value == "2.12") {
2020
Seq("-language:higherKinds")
@@ -77,7 +77,7 @@ lazy val core = project
7777
val scalaXmlVer = Def.setting[String] {
7878
val sv = scalaBinaryVersion.value
7979

80-
if (sv startsWith "3") "2.0.1"
80+
if (sv.startsWith("3")) "2.0.1"
8181
else if (sv == "2.13") "1.3.0"
8282
else "1.0.6"
8383
}
@@ -276,7 +276,7 @@ lazy val gridfs = project
276276

277277
lazy val playTest = Def.setting {
278278
val ver = {
279-
if (scalaBinaryVersion.value startsWith "3") {
279+
if (scalaBinaryVersion.value.startsWith("3")) {
280280
"2.8.11"
281281
} else if (
282282
scalaBinaryVersion.value == "2.13" && playVer.value.startsWith("2.7")
@@ -302,21 +302,21 @@ lazy val play = project
302302
val ver = (ThisBuild / version).value
303303
val playMajor = playVer.value.split("\\.").take(2).mkString
304304

305-
if (ver endsWith "-SNAPSHOT") {
305+
if (ver.endsWith("-SNAPSHOT")) {
306306
s"${ver.dropRight(9)}-play${playMajor}-SNAPSHOT"
307307
} else {
308308
s"${ver}-play${playMajor}"
309309
}
310310
},
311311
Test / sourceDirectory := {
312-
if (scalaBinaryVersion.value startsWith "3") {
312+
if (scalaBinaryVersion.value.startsWith("3")) {
313313
baseDirectory.value / "no-test" // TODO
314314
} else {
315315
(Test / sourceDirectory).value
316316
}
317317
},
318318
Test / unmanagedSourceDirectories ++= {
319-
if (scalaBinaryVersion.value startsWith "3") {
319+
if (scalaBinaryVersion.value.startsWith("3")) {
320320
Seq.empty
321321
} else {
322322
val v = playVer.value.split("\\.").take(2).mkString(".")
@@ -342,7 +342,7 @@ lazy val play = project
342342
},
343343
libraryDependencies ++= {
344344
val exclude: ModuleID => ModuleID = {
345-
if (scalaBinaryVersion.value startsWith "3") { (mid: ModuleID) =>
345+
if (scalaBinaryVersion.value.startsWith("3")) { (mid: ModuleID) =>
346346
mid
347347
.exclude("com.typesafe.akka", "*")
348348
.exclude("org.scala-lang.modules", "*")
@@ -369,7 +369,7 @@ lazy val play = project
369369
) % Provided
370370

371371
val playDeps: Seq[ModuleID] = {
372-
if (playVer.value startsWith "2.6") {
372+
if (playVer.value.startsWith("2.6")) {
373373
Seq(playMain)
374374
} else if (
375375
scalaBinaryVersion.value == "2.13" && playVer.value.startsWith("2.7")
@@ -406,32 +406,32 @@ lazy val play = project
406406
Compile / doc / sources := {
407407
val compiled = (Compile / sources).value
408408

409-
compiled.filter { _.getName endsWith "NamedStorage.java" }
409+
compiled.filter { _.getName.endsWith("NamedStorage.java") }
410410
}
411411
)
412412
.dependsOn(core % "test->test;compile->compile", vfs % "test->compile")
413413

414414
mimaPreviousArtifacts := Set.empty
415415

416-
lazy val benji = (project in file("."))
416+
lazy val benji = project
417+
.in(file("."))
417418
.enablePlugins(ScalaUnidocPlugin)
418419
.settings(
419-
Seq(
420+
Publish.settings ++ Seq(
420421
libraryDependencies ++= Dependencies.playAhcWS.value,
421422
pomPostProcess := Common.transformPomDependencies { depSpec =>
422423
// Filter in POM the dependencies only required to compile sample in doc
423424

424-
if ((depSpec \ "artifactId").text startsWith "benji-") {
425+
if ((depSpec \ "artifactId").text.startsWith("benji-")) {
425426
Some(depSpec)
426427
} else {
427428
Option.empty
428429
}
429430
},
430-
doc / excludeFilter := "play",
431-
Compile / doc / scalacOptions ++= List(
432-
"-skip-packages",
433-
"highlightextractor"
431+
mimaPreviousArtifacts := Set(
432+
/* organization.value %% name.value % previousRelease */
434433
),
434+
doc / excludeFilter := "play",
435435
ScalaUnidoc / unidoc / unidocAllSources ~= {
436436
_.map(_.filterNot { f =>
437437
val name = f.getName
@@ -442,7 +442,7 @@ lazy val benji = (project in file("."))
442442
f.getPath.indexOf("src_managed") != -1)
443443
})
444444
}
445-
) ++ Publish.settings
445+
)
446446
)
447447
.dependsOn(s3, google, vfs, gridfs, play)
448448
.aggregate(core, s3, google, vfs, gridfs, play)

codestyle.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ ThisBuild / scalafmtOnCompile := true
44
inThisBuild(
55
List(
66
// scalaVersion := "2.13.3",
7-
semanticdbEnabled := true,
87
semanticdbVersion := scalafixSemanticdb.revision,
98
scalafixDependencies += "io.github.cchantep" %% "offler-rules" % "1.0.1-SNAPSHOT"
109
)

0 commit comments

Comments
 (0)