Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gradleの実行環境設定を見直す

 Gradleの実行環境設定を見直す

2024/1/19に開催されたshibuya.apk #46で発表した「Gradleの実行環境設定を見直す」のスライドです

Yoshihiro WADA

January 19, 2024
Tweet

More Decks by Yoshihiro WADA

Other Decks in Programming

Transcript

  1. { “id”: “@e10dokup”, “name”: “Yoshihiro Wada”, “affiliations”: [ “CyberAgent Inc,

    / Ameba” ], “interested”: [ “camera”, “gadget”, “driving”, “motorsports” ] }
  2. CI Common Android memory issues CI 1 OS 75% RAM

    20GB 15GB PC Android Studio PC Android Studio RAM 16GB JVM 18
  3. -Xmx JVM Android Developers 4/6/8GB Gradle JVM -Xms org.gradle.jvmargs 20

    org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g -Dkotlin.daemon.jvm.options=-Xmx2g
  4. -XX:MaxMetaspaceSize Metaspace Gradle Gradle Plugin OOM 256m 384m Android org.gradle.jvmargs

    21 org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g -Dkotlin.daemon.jvm.options=-Xmx2g
  5. -Dkotlin.daemon.jvm.options Kotlin Daemon Kotlin Daemon Gradle org.gradle.jvmargs Gradle OOM org.gradle.jvmargs

    22 org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g -Dkotlin.daemon.jvm.options=-Xmx2g
  6. https://developer.android.com/build/optimize-your-build Optimize your build speed Android Developers https://support.circleci.com/hc/en-us/articles/360021812453- Common-Android-memory-issues Common

    Android Memory Issues Circle CI https://qiita.com/irgaly/items/4c22d233caf8ec55512e Android: GitHub Actions Gradle build daemon disappeared unexpectedly Qiita References 25