Skip to content

Commit 8772d46

Browse files
committed
Disable sbt 2 tests for now
1 parent 5367f02 commit 8772d46

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/sbt-test/sbt-maven/simple/build.sbt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (C) from 2023 The sbt contributors <https://github.com/sbt>
22

33
lazy val checkPluginXml = taskKey[Unit]("Verify that the generated Maven plugin descriptor exists under target.")
4+
lazy val runCompatTests = taskKey[Unit]("Run scripted fixture tests only on sbt versions with a compatible ScalaTest.")
45

56
lazy val root = project
67
.in(file("."))
@@ -12,17 +13,25 @@ lazy val root = project
1213
target.value / "classes" / "META-INF" / "maven" / "plugin.xml"
1314
} else {
1415
target.value / "resource_managed" / "main" / "META-INF" / "maven" / "plugin.xml"
15-
}
16+
}
1617
require(pluginXml.isFile, s"Expected generated plugin.xml at $pluginXml")
1718
},
19+
runCompatTests := {
20+
if (sbtBinaryVersion.value == "1.0") {
21+
(Test / test).value
22+
} else {
23+
// TODO Re-enable Test / test on sbt 2 once ScalaTest publishes a Scala 3 version compatible with sbt 2's Scala.
24+
streams.value.log.info("Skipping Test / test on sbt 2 until a compatible ScalaTest version is available.")
25+
}
26+
},
1827
crossPaths := false,
1928
autoScalaLibrary := false,
2029
organization := "com.example",
2130
name := "Simple",
2231
mavenPluginGoalPrefix := "simple",
2332
mavenLaunchOpts += version.apply { v => s"-Dplugin.version=$v" }.value,
2433
libraryDependencies ++= Seq(
25-
"org.scalatest" %% "scalatest" % "3.2.16" % Test,
26-
"org.scalatest" %% "scalatest-wordspec" % "3.2.16" % Test,
34+
"org.scalatest" %% "scalatest" % "3.2.20" % Test,
35+
"org.scalatest" %% "scalatest-wordspec" % "3.2.20" % Test,
2736
)
2837
)

src/sbt-test/sbt-maven/simple/src/test/scala/com/github/sbt/maven/simple/SimpleMojoSpec.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package com.github.sbt.maven.simple
66

77
import scala.io.BufferedSource
88
import scala.io.Source
9-
import scala.xml.Elem
109
import scala.xml.NodeSeq
1110
import scala.xml.XML
1211

src/sbt-test/sbt-maven/simple/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
> package
22
> checkPluginXml
3-
> test
3+
> runCompatTests
44
> scripted

0 commit comments

Comments
 (0)