mirror of
https://github.com/gradle/actions
synced 2024-11-24 02:12:12 +00:00
Support and test Gradle 3.5.1
Fix build-scan-capture.init.gradle so that it applies to versions 3.+, and include this version in test coverage.
This commit is contained in:
parent
e4ed35bcaf
commit
748dc30fdc
3 changed files with 18 additions and 4 deletions
9
.github/workflows/integ-test-execution.yml
vendored
9
.github/workflows/integ-test-execution.yml
vendored
|
@ -56,19 +56,26 @@ jobs:
|
|||
gradle-versions:
|
||||
strategy:
|
||||
matrix:
|
||||
gradle: [7.3, 6.9, 5.6.4, 4.10.3]
|
||||
gradle: [7.3, 6.9, 5.6.4, 4.10.3, 3.5.1]
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
include:
|
||||
- gradle: 5.6.4
|
||||
build-root-suffix: -gradle-5
|
||||
- gradle: 4.10.3
|
||||
build-root-suffix: -gradle-4
|
||||
- gradle: 3.5.1
|
||||
build-root-suffix: -gradle-4
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Download distribution if required
|
||||
uses: ./.github/actions/download-dist
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 8
|
||||
- name: Run Gradle build
|
||||
uses: ./
|
||||
id: gradle
|
||||
|
|
|
@ -59,19 +59,26 @@ jobs:
|
|||
gradle-versions:
|
||||
strategy:
|
||||
matrix:
|
||||
gradle: [7.3, 6.9, 5.6.4, 4.10.3]
|
||||
gradle: [7.3, 6.9, 5.6.4, 4.10.3, 3.5.1]
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
include:
|
||||
- gradle: 5.6.4
|
||||
build-root-suffix: -gradle-5
|
||||
- gradle: 4.10.3
|
||||
build-root-suffix: -gradle-4
|
||||
- gradle: 3.5.1
|
||||
build-root-suffix: -gradle-4
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Download distribution if required
|
||||
uses: ./.github/actions/download-dist
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 8
|
||||
- name: Setup Gradle
|
||||
uses: ./
|
||||
with:
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.gradle.util.GradleVersion
|
|||
def isTopLevelBuild = gradle.getParent() == null
|
||||
if (isTopLevelBuild) {
|
||||
def version = GradleVersion.current().baseVersion
|
||||
def atLeastGradle4 = version >= GradleVersion.version("4.0")
|
||||
def atLeastGradle3 = version >= GradleVersion.version("3.0")
|
||||
def atLeastGradle6 = version >= GradleVersion.version("6.0")
|
||||
|
||||
if (atLeastGradle6) {
|
||||
|
@ -16,7 +16,7 @@ if (isTopLevelBuild) {
|
|||
registerCallbacks(settings.extensions["gradleEnterprise"].buildScan, settings.rootProject.name)
|
||||
}
|
||||
}
|
||||
} else if (atLeastGradle4) {
|
||||
} else if (atLeastGradle3) {
|
||||
projectsEvaluated { gradle ->
|
||||
if (gradle.rootProject.pluginManager.hasPlugin("com.gradle.build-scan")) {
|
||||
registerCallbacks(gradle.rootProject.extensions["buildScan"], gradle.rootProject.name)
|
||||
|
|
Loading…
Reference in a new issue