Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Update list of supported gradle versions (#33)
Browse files Browse the repository at this point in the history
Description
===========

This pull requests adds a simple test script to check with the help of
integration tests which Gradle version works. I also did some changes in
the test setup to make these tests possible.

Changes
=======

![UPDATE] supported gradle versions list
  • Loading branch information
Larusso authored Apr 3, 2018
1 parent bba1473 commit cfc0b39
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 9 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,23 @@ 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 |
| :------------: | :----: |
| < 3.0 | ![no] |
| 3.0 | ![yes] |
| 3.1 | ![yes] |
| 3.2 | ![yes] |
| 3.3 | ![yes] |
| 3.4 | ![yes] |
| 3.5 | ![yes] |
| 3.5.1 | ![yes] |
| 4.0 | ![yes] |
| 4.1 | ![yes] |
| 4.2 | ![yes] |
| 4.3 | ![yes] |
| 4.4 | ![yes] |
| 4.5 | ![yes] |
| 4.6 | ![yes] |

Development
===========
Expand Down Expand Up @@ -92,3 +105,6 @@ limitations under the License.
[gradle]: https://gradle.org/ "Gradle"
[gradle_finalizedBy]: https://docs.gradle.org/3.5/dsl/org.gradle.api.Task.html#org.gradle.api.Task:finalizedBy
[gradle_dependsOn]: https://docs.gradle.org/3.5/dsl/org.gradle.api.Task.html#org.gradle.api.Task:dependsOn

[yes]: https://atlas-resources.wooga.com/icons/icon_check.svg "yes"
[no]: https://atlas-resources.wooga.com/icons/icon_uncheck.svg "no"
14 changes: 14 additions & 0 deletions gradle_check_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

versions=("3.0" "3.1" "3.2" "3.4" "3.4.1" "3.5" "3.5.1" "4.0" "4.1" "4.2" "4.3" "4.4" "4.5" "4.6")
for i in "${versions[@]}"
do
echo "test gradle version $i"
GRADLE_VERSION=$i ./gradlew integrationTest &> /dev/null
status=$?
mkdir -p "build/reports/$i"
mv build/reports/integrationTest "build/reports/$i"
if [ $status -ne 0 ]; then
echo "test error $i"
fi
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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.paket

class IntegrationSpec extends nebula.test.IntegrationSpec{

def setup() {
def gradleVersion = System.getenv("GRADLE_VERSION")
if (gradleVersion) {
this.gradleVersion = gradleVersion
fork = true
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package wooga.gradle.paket

import nebula.test.IntegrationSpec
import spock.lang.IgnoreIf
import spock.lang.Unroll

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@

package wooga.gradle.paket

import nebula.test.IntegrationSpec
import nebula.test.functional.ExecutionResult
import spock.lang.Shared
import spock.lang.Unroll
import wooga.gradle.paket.get.PaketGetPlugin

abstract class PaketIntegrationBaseSpec extends IntegrationSpec {

Expand Down Expand Up @@ -93,7 +91,7 @@ abstract class PaketIntegrationBaseSpec extends IntegrationSpec {
}

boolean hasNoSource(ExecutionResult result, String taskName) {
containsOutput(result.standardOutput, taskName, "NO-SOURCE")
containsOutput(result.standardOutput, taskName, "NO-SOURCE") || result.standardOutput.contains("Skipping task ':$taskName'")
}

private boolean containsOutput(String stdout, String taskName, String stateIdentifier) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DefaultPaketPluginExtension implements PaketPluginExtension {
private static final String DEFAULT_PAKET_BOOTSTRAPPER_EXECUTION_NAME = "paket.bootstrapper.exe"
private static final String DEFAULT_PAKET_DEPENDENCIES_FILE_NAME = "paket.dependencies"
private static
final String DEFAULT_PAKET_BOOTSTRAPPER_URL = "https://github.com/fsprojects/Paket/releases/download/4.8.5/paket.bootstrapper.exe"
final String DEFAULT_PAKET_BOOTSTRAPPER_URL = "https://github.com/fsprojects/Paket/releases/download/5.155.0/paket.bootstrapper.exe"

private static final String DEFAULT_VERSION = ""
private static final String DEFAULT_MONO_EXECUTABLE = "mono"
Expand Down

0 comments on commit cfc0b39

Please sign in to comment.