[2.x] test: Fix project-matrix test TODO (#9596)

This commit is contained in:
kenji yoshida 2026-08-14 08:33:28 +09:00 committed by GitHub
parent c717609ab2
commit 98d17419d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 13 deletions

View File

@ -4,23 +4,11 @@ val scala212 = "2.12.21"
organization := "com.example"
version := "0.1.0-SNAPSHOT"
lazy val checkSbt2Plugin = taskKey[Unit]("")
lazy val plugin = (projectMatrix in file("plugin"))
.enablePlugins(SbtPlugin)
.settings(
organization := "com.example",
name := "sbt-example",
// TODO: Once 2.0 is released we can move this check to the `test` file
checkSbt2Plugin := {
val repo = (ThisBuild / baseDirectory).value / "repo"
val sbtV = sbtBinaryVersion.value
val expected = (repo / "com" / "example" /
s"sbt-example_sbt${sbtV}_3" /
"0.1.0-SNAPSHOT" /
s"sbt-example_sbt${sbtV}_3-0.1.0-SNAPSHOT.pom")
assert(expected.exists, s"$expected did not exist")
},
)
.jvmPlatform(scalaVersions = Seq(scala3, scala212))

View File

@ -5,4 +5,4 @@
$ exists repo/com/example/sbt-example_2.12_1.0/0.1.0-SNAPSHOT/sbt-example_2.12_1.0-0.1.0-SNAPSHOT.pom
$ absent repo/com/example/sbt-example_2.12_1.0/0.1.0-SNAPSHOT/sbt-example-0.1.0-SNAPSHOT.pom
> checkSbt2Plugin
$ exists repo/com/example/sbt-example_sbt2_3/0.1.0-SNAPSHOT/sbt-example_sbt2_3-0.1.0-SNAPSHOT.pom