Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,779
Community Members
 
Community Events
168
Community Groups

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

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

3,449 views 3 10
Read article

Atlassian Community Events