Skip to content

Commit

Permalink
Ignore warnings for now
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Feb 16, 2023
1 parent 4a3d380 commit 0a2980a
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -949,10 +949,19 @@ class NexusPublishPluginTests {
gradleRunner(*arguments).buildAndFail()

private fun gradleRunner(vararg arguments: String): GradleRunner {
val warnings = when {
// There's a deprecation in Gradle 7.6 that doesn't allow for passing builds.
// See https://github.com/gradle-nexus/publish-plugin/issues/152 for more details.
// This conditional branch of when should be removed once that issue is fixed.
gradleVersion >= GradleVersion.version("7.6") -> "all"
// Failing only became an option at Gradle 5.6.
gradleVersion >= GradleVersion.version("5.6") -> "fail"
else -> "all"
}
return gradleRunner
// .withDebug(true)
.withProjectDir(projectDir.toFile())
.withArguments(*arguments, "--stacktrace", "--warning-mode=${if (gradleVersion >= GradleVersion.version("5.6")) "fail" else "all"}")
.withArguments(*arguments, "--stacktrace", "--warning-mode=${warnings}")
.forwardOutput()
}

Expand Down

0 comments on commit 0a2980a

Please sign in to comment.