0

According to Cannot add task 'wrapper' as a task with that name already exists CircleCI uses

  • the task wrapper(type: Wrapper) { [...] } syntax in config.yml (tested: no, it doesn't in my case)
  • the wrapper { [...] } syntax in config.yml (tested: no, it doesn't in my case)
  • takes the version from gradle-wrapper.properties (tested: no, it doesn't in my case)

Every time my tests end up with CircleCI using gradle v6.2.2 - but Spring Boot plugin requires Gradle 5 (5.6.x only) or Gradle 6 (6.3 or later).

I also can't understand, why https://stackoverflow.com/a/54741656/7773582 refers to

wrapper {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}

when there is an -all-package and also a -bin-package for every gradle wrapper version in https://services.gradle.org/distributions? Maybe someone can tell me the background to this?

How can I convince CircleCI to download and use the gradle wrapper I use in my development environment and build?

Jochen Haßfurter
  • 875
  • 2
  • 13
  • 27

1 Answers1

0

It seems that the gradle version can not be changed, because it is fixed in the docker image which is used. In my case it is

jobs:
  build:
    docker:
      - image: circleci/openjdk:13.0.2-jdk-buster-browsers

and the Gradle-Version is configured in the respective Dockerfile:

# Install Gradle Version: 6.2.2
RUN curl --silent --show-error --location --fail --retry 3 --output /tmp/gradle.zip     https://services.gradle.org/distributions/gradle-6.2.2-bin.zip   && unzip -d /opt /tmp/gradle.zip   && rm /tmp/gradle.zip   && ln -s /opt/gradle-* /opt/gradle   && /opt/gradle/bin/gradle -version

It's working now with another docker image.

Jochen Haßfurter
  • 875
  • 2
  • 13
  • 27