Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Circle Gradle Warning: The build VMs have a memory limit of 4G

Trying to run my Gradle Android project on circleci.com I got the following Warning:

Warning: The build VMs have a memory limit of 4G. Your build hit this limit on one or more containers, and your build results are likely invalid.

like image 818
Gal Bracha Avatar asked Nov 30 '22 10:11

Gal Bracha


1 Answers

The GRADLE_OPTS can be set in the circle.yml file:

machine:
   environment:
     GRADLE_OPTS: -Xmx512m -XX:MaxPermSize=512m

Allowing you to keep development configs and build configs separate.

Edit:

CircleCi have updated their documentation, this is the recommended config for Android builds:

machine:
  environment:
    GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
like image 140
ajack Avatar answered Dec 04 '22 17:12

ajack