From 3d4603f6bb136e16b3c8cbc109f9a236808df5c2 Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Fri, 16 Aug 2024 17:21:13 +0200 Subject: [PATCH] #318 Show tested Gradle versions for Plugin --- htmlSanityCheck-gradle-plugin/README.adoc | 9 ++++++++ .../HtmlSanityCheckTaskFunctionalTest.groovy | 23 +++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/htmlSanityCheck-gradle-plugin/README.adoc b/htmlSanityCheck-gradle-plugin/README.adoc index ba8d8cdc..7b6c4234 100644 --- a/htmlSanityCheck-gradle-plugin/README.adoc +++ b/htmlSanityCheck-gradle-plugin/README.adoc @@ -314,6 +314,15 @@ htmlSanityCheck { ---- +== Compatibility + +The Plugin has been tested with the following Gradle versions: + +[source] +.Tested Gradle versions +---- +include::src/test/groovy/org/aim42/htmlsanitycheck/HtmlSanityCheckTaskFunctionalTest.groovy[tag=tested-gradle-versions,indent=0] +---- [[sec:development-versions]] == Development versions diff --git a/htmlSanityCheck-gradle-plugin/src/test/groovy/org/aim42/htmlsanitycheck/HtmlSanityCheckTaskFunctionalTest.groovy b/htmlSanityCheck-gradle-plugin/src/test/groovy/org/aim42/htmlsanitycheck/HtmlSanityCheckTaskFunctionalTest.groovy index db5df0eb..5c8eae44 100644 --- a/htmlSanityCheck-gradle-plugin/src/test/groovy/org/aim42/htmlsanitycheck/HtmlSanityCheckTaskFunctionalTest.groovy +++ b/htmlSanityCheck-gradle-plugin/src/test/groovy/org/aim42/htmlsanitycheck/HtmlSanityCheckTaskFunctionalTest.groovy @@ -14,12 +14,15 @@ import static org.gradle.testkit.runner.TaskOutcome.SUCCESS class HtmlSanityCheckTaskFunctionalTest extends Specification { private final static VALID_HTML = """""" private final static INVALID_HTML = """ """ - private final static GRADLE_VERSIONS = [ // 6.x or older does not work! - '7.6.3', // latest 7.x - '8.0.2', '8.1.1', '8.2.1', '8.3', '8.4', - '8.5', '8.6', '8.7', '8.8', '8.9', - '8.10' // all 8.x (latest patches) - ] + private final static GRADLE_VERSIONS = [ + // tag::tested-gradle-versions[] + // 6.x or older does not work! + '7.6.3', // latest 7.x + '8.0.2', '8.1.1', '8.2.1', '8.3', '8.4', + '8.5', '8.6', '8.7', '8.8', '8.9', + '8.10' // all 8.x minor versions (latest patch release) + // end::tested-gradle-versions[] + ] @Rule TemporaryFolder testProjectDir = new TemporaryFolder() @@ -134,10 +137,10 @@ class HtmlSanityCheckTaskFunctionalTest extends Specification { private GradleRunner runnerForHtmlSanityCheckTask(String gradleVersion) { GradleRunner.create() - .withGradleVersion(gradleVersion) - .withProjectDir(testProjectDir.root) - .withPluginClasspath() - .withArguments('htmlSanityCheck') + .withGradleVersion(gradleVersion) + .withProjectDir(testProjectDir.root) + .withPluginClasspath() + .withArguments('htmlSanityCheck') } private static class HtmlReport {