From 417d937be8d6e270e3fce18052a2b8bc5e33890c Mon Sep 17 00:00:00 2001 From: Manfred Endres Date: Tue, 27 Jun 2017 15:52:39 +0200 Subject: [PATCH] Add gradle version support tests (#1) Add gradle version test to `ReleasePluginIntegrationSpec` Document supported versions in README --- README.md | 19 ++++++++++--- .../wooga/gradle/release/DummyTest.groovy | 27 ------------------- .../ReleasePluginIntegrationSpec.groovy | 21 +++++++++++++++ 3 files changed, 36 insertions(+), 31 deletions(-) delete mode 100644 src/integrationTest/groovy/wooga/gradle/release/DummyTest.groovy diff --git a/README.md b/README.md index 246103a..3a6ae27 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,18 @@ Gradle and Java Compatibility Built with Oracle JDK7 Tested with Oracle JDK8 -| Gradle Version | Works | -| :------------: | :---: | -| 3.4.1 | yes | -| 3.5 | yes | +| Gradle Version | Works | +| :------------- | :---------: | +| <= 2.13 | ![no] | +| 2.14 | ![yes] | +| 3.0 | ![yes] | +| 3.1 | ![yes] | +| 3.2 | ![yes] | +| 3.4 | ![yes] | +| 3.4.1 | ![yes] | +| 3.5 | ![yes] | +| 3.5.1 | ![yes] | +| 4.0 | ![yes] | LICENSE ======= @@ -67,3 +75,6 @@ limitations under the License. [visteg]: https://github.com/mmalohlava/gradle-visteg [paket]: https://fsprojects.github.io/Paket/ [nuget]: https://www.nuget.org/ + +[yes]: http://atlas-resources.wooga.com/icons/icon_check.svg "yes" +[no]: http://atlas-resources.wooga.com/icons/icon_uncheck.svg "no" diff --git a/src/integrationTest/groovy/wooga/gradle/release/DummyTest.groovy b/src/integrationTest/groovy/wooga/gradle/release/DummyTest.groovy deleted file mode 100644 index c8d26ba..0000000 --- a/src/integrationTest/groovy/wooga/gradle/release/DummyTest.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2017 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package wooga.gradle.release - -import spock.lang.Specification - -class DummyTest extends Specification { - - def "dummy"() { - expect: - true == true - } -} diff --git a/src/integrationTest/groovy/wooga/gradle/release/ReleasePluginIntegrationSpec.groovy b/src/integrationTest/groovy/wooga/gradle/release/ReleasePluginIntegrationSpec.groovy index 2819a57..46218ab 100644 --- a/src/integrationTest/groovy/wooga/gradle/release/ReleasePluginIntegrationSpec.groovy +++ b/src/integrationTest/groovy/wooga/gradle/release/ReleasePluginIntegrationSpec.groovy @@ -139,4 +139,25 @@ class ReleasePluginIntegrationSpec extends IntegrationSpec { then: result.standardOutput.contains("unityPack NO-SOURCE") } + + def gradleVersions() { + ["2.14", "3.0", "3.2", "3.4", "3.4.1", "3.5", "3.5.1", "4.0"] + } + + @Unroll("verify plugin activation with gradle #gradleVersionToTest") + def "activates with multiple gradle versions"() { + given: "a buildfile with unity plugin applied" + buildFile << """ + group = 'test' + ${applyPlugin(ReleasePlugin)} + """.stripIndent() + + gradleVersion = gradleVersionToTest + + expect: + runTasksSuccessfully("tasks") + + where: + gradleVersionToTest << gradleVersions() + } }