Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Does pipeline for android even work for big projects?

I have an android project which consists of 50 modules. In attempt to automatically do a release build on push, I've established a pipeline with the below scripts.

gradle.properties


#org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError
#org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError
#org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.jvmargs=-Xms512m -Xmx5g -XX:MaxPermSize=1024m -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

org.gradle.daemon=true

org.gradle.configureondemand=true

#org.gradle.parallel=true

android.useAndroidX=true

android.enableJetifier=true

kotlin.code.style=official

 

bitbucket-pipelines.yml

image: androidsdk/android-30

options:
size: 2x

pipelines:
default:
- step:
size: 2x
name: Android TestSv Release
caches:
- gradle
script:
- chmod 755 gradlew
- JAVA_OPTS="-Xms512m -Xmx5g -XX:MaxPermSize=1024m -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 Fu=IX ISSUE"
- echo "$SIGNING_JKS_FILE" | base64 -d > android-signing-keystore.jks
- ./gradlew assembleSvtestRelease
artifacts:
- A0_Application/**
after-script:
- pipe: atlassian/checkstyle-report:0.2.0

definitions:
services:
docker:
memory: 1024

This works for assembleDebug, but for release, the memory keeps exceeding. I've searched for a day to make this to work for my project, but with no luck. 

The tutorials I've found were just small samples without any consideration about the memory stuff. 


Does the pipeline has the capability to build such multi module project? If so, what should I change for my script?

 

1 answer

0 votes
alr3000 I'm New Here Nov 04, 2021

There is an answer here: https://community.atlassian.com/t5/Bitbucket-questions/Why-I-can-t-build-android-project-on-Pipelines/qaq-p/1003995

basically, increase the memory:

- step:
size: 2x # Double resources available for this step.

Seemed to work for me, but mine was only intermittently failing.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

178 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you