mit einem Klick
jenv-gradle-low-ram
// Align jenv with .java-version and run Gradle reliably on low-RAM machines. Use for Java mismatch errors, Gradle OOMs, daemon memory pressure, and selecting safe build flags.
// Align jenv with .java-version and run Gradle reliably on low-RAM machines. Use for Java mismatch errors, Gradle OOMs, daemon memory pressure, and selecting safe build flags.
Understand and change retrofit-graphql build logic, module dependencies, version catalog entries, Dokka setup, and shared Gradle conventions. Use for buildSrc edits, new dependencies, or documentation pipeline work.
Write or improve KDoc for public APIs in retrofit-graphql. Use for Dokka updates, annotation docs, converter docs, discovery plugin docs, logger docs, and explaining how consumers should integrate or extend the library.
Reference map for retrofit-graphql modules, package roots, dependency direction, consumer entry points, and Dokka navigation. Use for questions like which module should own this code, where a class should live, what consumers should import, or how the library is organized.
| name | jenv-gradle-low-ram |
| description | Align jenv with .java-version and run Gradle reliably on low-RAM machines. Use for Java mismatch errors, Gradle OOMs, daemon memory pressure, and selecting safe build flags. |
| argument-hint | Describe your target task and available RAM, for example: assembleDebug on 8GB RAM |
java and Gradle use the Java version pinned by .java-version../gradlew is about to be invoked in this repository..java-version is the active runtime for Gradle.This repository pins Java 21.0.8 in .java-version. On developer machines with jenv installed, navigating to the project root automatically selects that JDK. In CI, actions/setup-java with java-version: 21 handles selection instead. The copilot-setup-steps.yml workflow mirrors the CI approach.
cat .java-version
jenv is installed and initialized.command -v jenv
jenv versions
jenv version
Decision point:
jenv is not found, install and initialize it in your shell startup.jenv is found but jenv version does not match .java-version, continue to step 3.required_java="$(cat .java-version)"
jenv local "$required_java"
Decision point:
jenv local fails because the version is missing, install that JDK and run jenv add <jdk-path>, then retry.java -version
./gradlew -version
Quality check:
./gradlew -version must match the .java-version major version (21).Preferred one-off profile for a debug build (:app module; not available in CI):
./gradlew --no-daemon --max-workers=2 \
-Dorg.gradle.jvmargs="-Xmx1536m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8" \
:app:assembleDebug
For library unit tests:
./gradlew --no-daemon --max-workers=2 \
-Dorg.gradle.jvmargs="-Xmx1792m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8" \
:library:test
For Spotless formatting check:
./gradlew --no-daemon --max-workers=2 \
-Dorg.gradle.jvmargs="-Xmx1536m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8" \
spotlessCheck
./gradlew --no-daemon --max-workers=1 -Dorg.gradle.parallel=false :library:test
Suggested entries for ~/.gradle/gradle.properties:
org.gradle.daemon=false
org.gradle.parallel=false
org.gradle.workers.max=2
org.gradle.jvmargs=-Xmx1536m -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
jenv version correct but java -version wrong:
Ensure shell init runs eval "$(jenv init -)" and enable export plugin with jenv enable-plugin export.Gradle daemon disappeared unexpectedly:
Retry with --no-daemon --max-workers=1 and lower -Xmx if the OS is reclaiming memory aggressively.:library:test or :app:assembleDebug) instead of full-project builds.:app not found:
The app module is excluded when the CI environment variable is set. Run debug builds locally without CI set, or unset it temporarily..java-version and jenv version resolve to the same Java release../gradlew -version reports the expected JVM..java-version and run debug build with 8GB RAM settings"