Skip to content

Commit b9c9455

Browse files
authored
Update dependencies & switch to Scala 3 sources (#40)
* Update sbt to 1.10.0 * Update sbt plugins * Update dependencies * Update scalafmt * Use Scala 3 source
1 parent ad8c30d commit b9c9455

File tree

7 files changed

+23
-24
lines changed

7 files changed

+23
-24
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 3.6.1
1+
version = 3.8.2
22
runner.dialect = scala212source3
33

44
maxColumn = 120

build.sbt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name := "sbt-dependency-lock"
22
organization := "software.purpledragon"
33

4-
enablePlugins(SbtPlugin, ParadoxSitePlugin, GhpagesPlugin)
4+
enablePlugins(SbtPlugin, SitePreviewPlugin, ParadoxSitePlugin, GhpagesPlugin)
55

6-
val circeVersion = "0.14.3"
6+
val circeVersion = "0.14.9"
77

88
libraryDependencies ++= Seq(
99
"io.circe" %% "circe-core",
@@ -13,19 +13,19 @@ libraryDependencies ++= Seq(
1313

1414
libraryDependencies ++= Seq(
1515
"software.purpledragon" %% "text-utils" % "1.3.1",
16-
"org.scalatest" %% "scalatest" % "3.2.14" % Test,
16+
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
1717
)
1818

1919
organizationName := "Michael Stringer"
2020
startYear := Some(2019)
21-
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt"))
21+
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.txt"))
2222

2323
scriptedLaunchOpts := {
2424
scriptedLaunchOpts.value ++
2525
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
2626
}
2727

28-
ThisBuild / scapegoatVersion := "2.1.0"
28+
ThisBuild / scapegoatVersion := "2.1.6"
2929

3030
developers := List(
3131
Developer("stringbean", "Michael Stringer", "@the_stringbean", url("https://github.com/stringbean")),
@@ -39,7 +39,7 @@ scmInfo := Some(
3939
git.remoteRepo := "[email protected]:stringbean/sbt-dependency-lock.git"
4040
publishTo := sonatypePublishToBundle.value
4141

42-
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
42+
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations.*
4343

4444
releasePublishArtifactsAction := PgpKeys.publishSigned.value
4545

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.8.0
1+
sbt.version=1.10.0

project/plugins.sbt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// publishing
2-
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
3-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
4-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
2+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
3+
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
4+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.0")
55

66
// code style
7-
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0")
8-
addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.1.1")
9-
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
7+
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
8+
addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.2.4")
9+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
1010

1111
// documentation
12-
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
13-
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.2")
14-
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
12+
addSbtPlugin("com.github.sbt" % "sbt-site-paradox" % "1.5.0")
13+
addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0")

src/main/scala/software/purpledragon/sbt/lock/DependencyLockIO.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ package software.purpledragon.sbt.lock
1818

1919
import java.io.File
2020

21-
import io.circe.parser._
22-
import io.circe.syntax._
21+
import io.circe.parser.*
22+
import io.circe.syntax.*
2323
import sbt.io.IO
24-
import software.purpledragon.sbt.lock.model.Decoders._
24+
import software.purpledragon.sbt.lock.model.Decoders.*
2525
import software.purpledragon.sbt.lock.model.DependencyLockFile
2626

2727
object DependencyLockIO {

src/main/scala/software/purpledragon/sbt/lock/DependencyLockPlugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ object DependencyLockPlugin extends AutoPlugin {
141141
}.value,
142142
)
143143

144-
override def globalSettings: Seq[Def.Setting[_]] = Seq(
144+
override def globalSettings: Seq[Def.Setting[?]] = Seq(
145145
dependencyLockAutoCheck := DependencyLockUpdateMode.WarnOnError,
146146
dependencyLockModuleFilter := DependencyFilter.fnToModuleFilter(_ => false),
147147
dependencyLockConfigurationFilter := DependencyFilter.fnToConfigurationFilter(_ => false),

src/main/scala/software/purpledragon/sbt/lock/util/MessageUtil.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ object MessageUtil {
2525
val messages: ResourceBundle = ResourceBundle.getBundle("messages")
2626

2727
def format(template: String, args: Any*): String = {
28-
MessageFormat.format(template, args.map(unwrapArg): _*)
28+
MessageFormat.format(template, args.map(unwrapArg)*)
2929
}
3030

3131
def formatMessage(key: String, args: Any*): String = {
32-
format(messages.getString(key), args.map(unwrapArg): _*)
32+
format(messages.getString(key), args.map(unwrapArg)*)
3333
}
3434

3535
def formatPlural(baseKey: String, count: Int, args: Any*): String = {
@@ -40,7 +40,7 @@ object MessageUtil {
4040
)
4141

4242
val choice = new ChoiceFormat(Array(0, 1, 2), formatStrings)
43-
format(choice.format(count), count +: args: _*)
43+
format(choice.format(count), (count +: args)*)
4444
}
4545

4646
@SuppressWarnings(Array("AsInstanceOf"))

0 commit comments

Comments
 (0)