Downgrade Gradle version on Azure Pipeline

Viewed 1305

After the 7.0 Gradle version my pipeline is crashing. I want to downgrade it to 6.8.3. I tried with gradle wrapper --gradle-version=6.8.3 but its do nothing. Btw its a Microsoft-hosted agent with ubuntu-latest VM.

2 Answers

I didn't find other solution, but it's work correctly.

- script: |
    wget https://downloads.gradle-dn.com/distributions/gradle-6.8.3-bin.zip
    unzip -d . gradle-6.8.3-bin.zip
  displayName: Download Gradle 6.8.3
- script: |
    ./../../gradle-6.8.3/bin/gradle bundleRelease
  displayName: Build Bundle

Please add distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip in your gradle/wrapper/gradle-wrapper.properties file.

For example:enter image description here

Here is the document.

Here is my configuration of pipeline and result:

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: Gradle@2
  inputs:
    gradleWrapperFile: 'gradlew'
    tasks: 'build'
    publishJUnitResults: false
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.8'
    gradleOptions: '-Xmx3072m'
    sonarQubeRunAnalysis: false

enter image description here

Related