Skip to content

Commit

Permalink
#318 Show tested Gradle versions for Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Aug 21, 2024
1 parent 2c0c1e5 commit 3d4603f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
9 changes: 9 additions & 0 deletions htmlSanityCheck-gradle-plugin/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
class HtmlSanityCheckTaskFunctionalTest extends Specification {
private final static VALID_HTML = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head></head><body></body><html>"""
private final static INVALID_HTML = """<body><span id="id"/><span id="id"/></body> """
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()
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 3d4603f

Please sign in to comment.