Missed Team ’24? Catch up on announcements here.

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

Use BITBUCKET_BUILD_NUMBER while building Android projects with gradle (pipeline)

Naiyin Tan May 9, 2018

I want to use BITBUCKET_BUILD_NUMBER in the version number while gradle assumbling.

However, I found there is no way to pass it into the gradle!

Can any one help, I've wasted two days...

1 answer

0 votes
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 16, 2018

Hey @Naiyin Tan,

the build number gets injected as an environment variable into you build as `$BITBUCKET_BUILD_NUMBER`. 

 

So for example, you could execute something like this: 

gradle -Pversion=$BITBUCKET_BUILD_NUMBER publish

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events