Skip to content

Update dependencies & switch to Scala 3 sources #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.6.1
version = 3.8.2
runner.dialect = scala212source3

maxColumn = 120
Expand Down
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name := "sbt-dependency-lock"
organization := "software.purpledragon"

enablePlugins(SbtPlugin, ParadoxSitePlugin, GhpagesPlugin)
enablePlugins(SbtPlugin, SitePreviewPlugin, ParadoxSitePlugin, GhpagesPlugin)

val circeVersion = "0.14.3"
val circeVersion = "0.14.9"

libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
Expand All @@ -13,19 +13,19 @@ libraryDependencies ++= Seq(

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

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

scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
}

ThisBuild / scapegoatVersion := "2.1.0"
ThisBuild / scapegoatVersion := "2.1.6"

developers := List(
Developer("stringbean", "Michael Stringer", "@the_stringbean", url("https://github.com/stringbean")),
Expand All @@ -39,7 +39,7 @@ scmInfo := Some(
git.remoteRepo := "git@github.com:stringbean/sbt-dependency-lock.git"
publishTo := sonatypePublishToBundle.value

import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations.*

releasePublishArtifactsAction := PgpKeys.publishSigned.value

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.10.0
17 changes: 8 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
// publishing
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.0")

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

// documentation
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
addSbtPlugin("com.github.sbt" % "sbt-site-paradox" % "1.5.0")
addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0")
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package software.purpledragon.sbt.lock

import java.io.File

import io.circe.parser._
import io.circe.syntax._
import io.circe.parser.*
import io.circe.syntax.*
import sbt.io.IO
import software.purpledragon.sbt.lock.model.Decoders._
import software.purpledragon.sbt.lock.model.Decoders.*
import software.purpledragon.sbt.lock.model.DependencyLockFile

object DependencyLockIO {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ object DependencyLockPlugin extends AutoPlugin {
}.value,
)

override def globalSettings: Seq[Def.Setting[_]] = Seq(
override def globalSettings: Seq[Def.Setting[?]] = Seq(
dependencyLockAutoCheck := DependencyLockUpdateMode.WarnOnError,
dependencyLockModuleFilter := DependencyFilter.fnToModuleFilter(_ => false),
dependencyLockConfigurationFilter := DependencyFilter.fnToConfigurationFilter(_ => false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ object MessageUtil {
val messages: ResourceBundle = ResourceBundle.getBundle("messages")

def format(template: String, args: Any*): String = {
MessageFormat.format(template, args.map(unwrapArg): _*)
MessageFormat.format(template, args.map(unwrapArg)*)
}

def formatMessage(key: String, args: Any*): String = {
format(messages.getString(key), args.map(unwrapArg): _*)
format(messages.getString(key), args.map(unwrapArg)*)
}

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

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

@SuppressWarnings(Array("AsInstanceOf"))
Expand Down
Loading