Skip to content

Commit c5ce836

Browse files
committed
Replace to new wildcard syntax
1 parent 55f7aa7 commit c5ce836

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/main/scala/sbtbuildinfo/BuildInfo.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ object BuildInfo {
6161
}
6262

6363
private def ident(scoped: Scoped): String = ident(scoped.scope, scoped.key)
64-
private def ident(scoped: ScopedKey[_]): String = ident(scoped.scope, scoped.key)
64+
private def ident(scoped: ScopedKey[?]): String = ident(scoped.scope, scoped.key)
6565

66-
private def ident(scope: Scope, attrKey: AttributeKey[_]): String = {
66+
private def ident(scope: Scope, attrKey: AttributeKey[?]): String = {
6767
val config = scope.config.toOption map (_.name) filter (_ != "compile")
6868
val inTask = scope.task.toOption map (_.label)
6969
val key = attrKey.label.split("-").toList match {
@@ -73,7 +73,7 @@ object BuildInfo {
7373
Seq(config, inTask, Some(key)).flatten mkString "_"
7474
}
7575

76-
private def ident(task: Task[_]): String =
76+
private def ident(task: Task[?]): String =
7777
taskName(task) match {
7878
case Some(name) => name
7979
case None =>

src/main/scala/sbtbuildinfo/BuildInfoKeys.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trait BuildInfoKeys {
99
lazy val buildInfoObject = settingKey[String]("The name for the generated object.")
1010
lazy val buildInfoPackage = settingKey[String]("The name for the generated package.")
1111
lazy val buildInfoUsePackageAsPath = settingKey[Boolean]("If true, the generated object is placed in the folder of the package instead of \"sbt-buildinfo\".")
12-
lazy val buildInfoKeys = settingKey[Seq[PluginCompat.Entry[_]]]("Entries for build info.")
12+
lazy val buildInfoKeys = settingKey[Seq[PluginCompat.Entry[?]]]("Entries for build info.")
1313
lazy val buildInfoBuildNumber = taskKey[Int]("The build number.")
1414
lazy val buildInfoOptions = settingKey[Seq[BuildInfoOption]]("Options for generating the build info.")
1515
}

src/main/scala/sbtbuildinfo/BuildInfoPlugin.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import sbt.Plugins.Basic
77
import sbt.util.CacheImplicits.{ *, given }
88

99
object BuildInfoPlugin extends AutoPlugin {
10-
type BuildInfoKey = PluginCompat.Entry[_]
10+
type BuildInfoKey = PluginCompat.Entry[?]
1111

1212
override def requires = plugins.JvmPlugin
1313

@@ -39,7 +39,7 @@ object BuildInfoPlugin extends AutoPlugin {
3939
buildInfoRenderFactory := (if(scalaVersion.value.startsWith("3")) Scala3CaseObjectRenderer.apply else ScalaCaseObjectRenderer.apply)
4040
)
4141

42-
override def projectSettings: Seq[Def.Setting[_]] = buildInfoScopedSettings(Compile) ++ buildInfoDefaultSettings
42+
override def projectSettings: Seq[Def.Setting[?]] = buildInfoScopedSettings(Compile) ++ buildInfoDefaultSettings
4343

4444
def buildNumberTask(dir: File, increment: Int): Int = {
4545
val file: File = dir / "buildinfo.properties"
@@ -61,7 +61,7 @@ object BuildInfoPlugin extends AutoPlugin {
6161

6262
import TupleSyntax._
6363

64-
def buildInfoScopedSettings(conf: Configuration): Seq[Def.Setting[_]] = inConfig(conf)(Seq(
64+
def buildInfoScopedSettings(conf: Configuration): Seq[Def.Setting[?]] = inConfig(conf)(Seq(
6565
buildInfo := Def.uncached((
6666
RichRichTaskable11((
6767
buildInfoRenderer,

src/main/scala/sbtbuildinfo/JavaRenderer.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ abstract class JavaRenderer(pkg: String, cl: String, makeStatic: Boolean) extend
213213
case node: scala.xml.NodeSeq if node.toString().trim.nonEmpty => node.toString()
214214
case node: scala.xml.NodeSeq => scala.xml.NodeSeq.Empty.toString()
215215
case (k, _v) => "new java.util.AbstractMap.SimpleImmutableEntry<>(%s, %s)" format (quote(k), quote(_v))
216-
case mp: Map[_, _] => mp.toList.map(quote(_)).mkString("internalAsMap(", ", ", ")")
217-
case seq: collection.Seq[_] =>
216+
case mp: Map[?, ?] => mp.toList.map(quote(_)).mkString("internalAsMap(", ", ", ")")
217+
case seq: collection.Seq[?] =>
218218
seq.map(quote).mkString("java.util.Collections.unmodifiableList(java.util.Arrays.asList(", ", ", "))")
219-
case op: Option[_] =>
219+
case op: Option[?] =>
220220
op map { x => "java.util.Optional.of(" + quote(x) + ")" } getOrElse { "java.util.Optional.empty()" }
221221
case url: java.net.URL => "internalAsUrl(%s)" format quote(url.toString)
222222
case uri: java.net.URI => "internalAsUri(%s)" format quote(uri.toString)
223223
case file: java.io.File => "new java.io.File(%s)" format quote(file.toString)
224-
case attr: sbt.Attributed[_] => quote(attr.data)
224+
case attr: sbt.Attributed[?] => quote(attr.data)
225225
case date: java.time.LocalDate => "java.time.LocalDate.parse(%s)" format quote(date.toString)
226226
case instant: java.time.Instant => "java.time.Instant.parse(%s)" format quote(instant.toString)
227227
case s => "\"%s\"" format encodeStringLiteral(s.toString)

src/main/scala/sbtbuildinfo/ScalaRenderer.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ abstract class ScalaRenderer extends BuildInfoRenderer {
103103
case node: scala.xml.NodeSeq if node.toString().trim.nonEmpty => node.toString()
104104
case _: scala.xml.NodeSeq => "scala.xml.NodeSeq.Empty"
105105
case (k, _v) => "(%s -> %s)" format(quote(k), quote(_v))
106-
case mp: Map[_, _] => mp.toList.map(quote(_)).mkString("Map(", ", ", ")")
107-
case seq: collection.Seq[_] => seq.map(quote).mkString("scala.collection.immutable.Seq(", ", ", ")")
108-
case op: Option[_] => op map { x => "scala.Some(" + quote(x) + ")" } getOrElse {"scala.None"}
106+
case mp: Map[?, ?] => mp.toList.map(quote(_)).mkString("Map(", ", ", ")")
107+
case seq: collection.Seq[?] => seq.map(quote).mkString("scala.collection.immutable.Seq(", ", ", ")")
108+
case op: Option[?] => op map { x => "scala.Some(" + quote(x) + ")" } getOrElse {"scala.None"}
109109
case url: java.net.URL => "new java.net.URI(%s).toURL" format quote(url.toString)
110110
case uri: java.net.URI => "new java.net.URI(%s)" format quote(uri.toString)
111111
case file: java.io.File => "new java.io.File(%s)" format quote(file.toString)
112-
case attr: sbt.Attributed[_] => quote(attr.data)
112+
case attr: sbt.Attributed[?] => quote(attr.data)
113113
case date: java.time.LocalDate => "java.time.LocalDate.parse(%s)" format quote(date.toString)
114114
case instant: java.time.Instant => "java.time.Instant.parse(%s)" format quote(instant.toString)
115115
case s => "\"%s\"" format encodeStringLiteral(s.toString)

0 commit comments

Comments
 (0)