[2.x] ci: Avoid infix syntax in build files (#9157)

This commit is contained in:
kenji yoshida 2026-04-29 21:41:54 +09:00 committed by GitHub
parent 0968cbf7ef
commit 01fbc474f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View File

@ -129,7 +129,7 @@ val sbt20Plus =
"2.0.0-RC12",
)
val mimaSettings = mimaSettingsSince(sbt20Plus)
def mimaSettingsSince(versions: Seq[String]): Seq[Def.Setting[?]] = Def settings (
def mimaSettingsSince(versions: Seq[String]): Seq[Def.Setting[?]] = Def.settings(
mimaPreviousArtifacts := {
val crossVersion = if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled
if (sbtPlugin.value) {

View File

@ -42,7 +42,7 @@ object HouseRulesPlugin extends AutoPlugin {
(c / console / scalacOptions) --= Seq("-Ywarn-unused-import", "-Xlint")
)
private def scalaPartV = Def setting (CrossVersion partialVersion scalaVersion.value)
private def scalaPartV = Def.setting(CrossVersion.partialVersion(scalaVersion.value))
private implicit final class AnyWithIfScala[A](val __x: A) {
def ifScala2x(p: Long => Boolean) =

View File

@ -18,7 +18,7 @@ object PublishBinPlugin extends AutoPlugin {
private val dummyDoc = taskKey[File]("").withRank(Int.MaxValue)
override val globalSettings = Seq(publishLocalBin := (()))
override val projectSettings: Seq[Def.Setting[?]] = Def settings (
override val projectSettings: Seq[Def.Setting[?]] = Def.settings(
publishLocalBin := Classpaths
.publishOrSkip(publishLocalBinConfig, publishLocalBin / skip)
.value,

View File

@ -31,7 +31,7 @@ object Scripted {
// This is to workaround https://github.com/sbt/io/issues/110
if (!sys.props.contains("jna.nosys")) sys.props.put("jna.nosys", "true")
val RepoOverrideTest = config("repoOverrideTest") extend Compile
val RepoOverrideTest = config("repoOverrideTest").extend(Compile)
val sbtWindowsExcludeFilter: FileFilter =
if (scala.util.Properties.isWin)
@ -102,10 +102,10 @@ object Scripted {
} yield files map (f => s"$group/$f")
val testID = (for (group <- groupP; name <- nameP(group)) yield (group, name))
val testIdAsGroup = matched(testID) map (test => Seq(test))
val testIdAsGroup = matched(testID).map(test => Seq(test))
// (token(Space) ~> matched(testID)).*
(token(Space) ~> (PagedIds | testIdAsGroup)).* map (_.flatten)
(token(Space) ~> (PagedIds | testIdAsGroup)).*.map(_.flatten)
}
@nowarn

View File

@ -36,7 +36,7 @@ object Utils {
def projectComponent: Setting[?] =
projectID := (componentID.value match {
case Some(id) => projectID.value extra ("e:component" -> id)
case Some(id) => projectID.value.extra("e:component" -> id)
case None => projectID.value
})
@ -127,7 +127,7 @@ object Utils {
excludePomArtifact(n.text)
}
def excludePomArtifact(artifactId: String) = (artifactId startsWith "compiler-bridge")
def excludePomArtifact(artifactId: String) = artifactId.startsWith("compiler-bridge")
val testExclusive = test / tags += (ExclusiveTest, 1)