Gradle Build Cache
Avrea provides a build cache endpoint for Gradle. Build outputs are cached so that tasks with unchanged inputs are never re-executed.
On Avrea runners
Section titled “On Avrea runners”Gradle is pre-configured via ~/.gradle/init.gradle:
gradle.settingsEvaluated { settings -> settings.buildCache { remote(HttpBuildCache) { url = uri("http://avrea-host:8290/gradle-build/cas/") push = true allowInsecureProtocol = true } }}Your workflow needs no changes to point at Avrea. Just make sure the Gradle
build cache is enabled (--build-cache flag or org.gradle.caching=true in
gradle.properties):
jobs: build: runs-on: avrea-ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-java@v5 with: distribution: temurin java-version: '21' - run: ./gradlew build --build-cacheManual setup
Section titled “Manual setup”Add to your project settings.gradle:
// settings.gradlebuildCache { remote(HttpBuildCache) { url = uri("http://avrea-host:8290/gradle-build/cas/") push = true allowInsecureProtocol = true }}Then enable it in your workflow:
- run: ./gradlew build --build-cacheThe --build-cache flag enables the remote build cache. You can also set
org.gradle.caching=true in gradle.properties to enable it by default.