Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Gradle version : 8.4 for Pipeline, Andriod Build Failed

Waqas shoukat
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 28, 2023

Hi All,

I want to ask about an solution for andriod pipeline, My pipeline is failing because gradel version required for code is 8.4 and my pipeline as 7.x, I have set the version inside bitbucket yaml file configuration but it's seems the version is not updated or picked as required. Can someone help me on this matter. 

 

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 2, 2024

Hi @Waqas shoukat and welcome to the community!

If your Pipelines builds run on Atlassian's infrastructure or on a Linux Docker self-hosted runner, these builds use Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. So, the version of gradle that you see may be the one preinstalled on that Docker image you specify (unless you are installing gradle during the build).

If you are using a public Docker image as a build container, you can check any newer tags of this image and see if any image with a newer tag has a newer version of gradle.

If you have Docker installed on your computer, you can check that by running the command

docker run -it --entrypoint=/bin/bash atlassian/default-image:4

where atlassian/default-image:4 replace with the Docker image you want to check. The entrypoint in the command may need to be /bin/sh instead of /bin/bash depending on the image, but you can try /bin/bash first and if it doesn't work you can then try /bin/sh.

This command will start a Docker container based on this image and a bash prompt when the container starts. In the bash prompt of the container, you can run gradle --version to see what version of gradle is installed on that specific Docker image. You can repeat the process for multiple images and/or tags to see what version of gradle they have until you find a suitable one. For example, you can see different tags of the official gradle image here:

As I mentioned, the above applies to builds that run on Atlassian's infrastructure or a Linux Docker self-hosted runner. If you are using a Linux Shell, MacOS, or Windows runner, these builds run directly on the host machine so gradle probably needs to be updated there.

Please feel free to reach out if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events