binkley / modern-java-practices

Modern Java/JVM Build Practices
Other
933 stars 69 forks source link

Speed up builds with caching #466

Open binkley opened 4 months ago

binkley commented 4 months ago

See existing card #431. These two cards should be merged?

Tasks

References:

Include research on how to share the cache across projects.

Relates to #460, #431, #487.

Examples

When building for Gradle, I see that CI is pulling down the Gradle 8.8 distro. This is something we can cache:

  +build-with-gradle | --> RUN ./gradlew clean build
  +build-with-gradle | Downloading https://services.gradle.org/distributions/gradle-8.8-all.zip
  +build-with-gradle | .
  +build-with-gradle | ..

This only happens for the containerized build, not the "direct" build. Why?

binkley commented 3 months ago

Build now uses NVD API key. Performance issues for Earthly are from lack of a cache of NVD downloads. "Direct" builds are speedy.