diff --git a/.stutter/java11.lock b/.stutter/java11.lock index 1101040d..84cd0431 100644 --- a/.stutter/java11.lock +++ b/.stutter/java11.lock @@ -2,6 +2,7 @@ 5.0 5.6.4 6.0.1 -6.9.1 +6.9.3 7.0.2 -7.3 +7.6 +8.0 diff --git a/.stutter/java17.lock b/.stutter/java17.lock index 37eed97b..94e2ee56 100644 --- a/.stutter/java17.lock +++ b/.stutter/java17.lock @@ -1,2 +1,4 @@ # DO NOT MODIFY: Generated by Stutter plugin. -7.3 +7.3.3 +7.6 +8.0 diff --git a/.stutter/java8.lock b/.stutter/java8.lock index 1101040d..84cd0431 100644 --- a/.stutter/java8.lock +++ b/.stutter/java8.lock @@ -2,6 +2,7 @@ 5.0 5.6.4 6.0.1 -6.9.1 +6.9.3 7.0.2 -7.3 +7.6 +8.0 diff --git a/src/compatTest/kotlin/io/github/gradlenexus/publishplugin/NexusPublishPluginTests.kt b/src/compatTest/kotlin/io/github/gradlenexus/publishplugin/NexusPublishPluginTests.kt index a3263456..375cb997 100644 --- a/src/compatTest/kotlin/io/github/gradlenexus/publishplugin/NexusPublishPluginTests.kt +++ b/src/compatTest/kotlin/io/github/gradlenexus/publishplugin/NexusPublishPluginTests.kt @@ -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() }