The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Does pipeline for android even work for big projects?

한상진
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!
September 6, 2021

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
alr3000
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!
November 4, 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.

TAGS
AUG Leaders

Atlassian Community Events