stages:
- test

.check: &check
  stage: test
  image: java:8-jdk-alpine
  script: |
    apk --update add bash libstdc++
    ./gradlew --no-daemon check
  artifacts:
    paths:
    - build/tmp
    expire_in: 1 day
    when: on_failure

check v3.0:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.0'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.1:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.1'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.2.1:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.2.1'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.3:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.3'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.4:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.4'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

stages:
- test

.check: &check
  stage: test
  image: java:8-jdk-alpine
  script: |
    apk --update add bash libstdc++
    ./gradlew --no-daemon check
  artifacts:
    paths:
    - build/tmp
    expire_in: 1 day
    when: on_failure

check v3.0:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.0'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.1:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.1'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.2.1:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.2.1'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.3:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.3'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

check v3.4.1:
  <<: *check
  variables:
    GRADLE_VERSION_UNDER_TEST: '3.4.1'
    PERSISTENT_TEST_GRADLE_PROJECT_DIR: 'build/tmp'

Test against Gradle 3.4.1 instead of 3.4
Test against Gradle 3.4.1 instead of 3.4

It fixes regressions found in 3.4.