Skip to content

Commit

Permalink
chore: setup project for gradle cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollovati committed Feb 13, 2025
1 parent ca654b0 commit 7bcacf6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/gradle-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Gradle cache test

on: [workflow_dispatch, pull_request_target]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
# The Gradle wrapper's version (already the default, putting it here to clarity)
gradle-version: wrapper
# Removing unused files from Gradle User Home before saving to cache (i.e. older versions of gradle)
gradle-home-cache-cleanup: true
# Cache downloaded JDKs in addition to the default directories.
gradle-home-cache-includes: |
caches
notifications
jdks
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
# Only write to the cache for builds on the 'main' and 'release' branches. (Default is 'main' only.)
# Builds on other branches will only read existing entries from the cache.
#cache-read-only: ${{ github.ref != 'refs/heads/main' }}
# Allow writing to cache
cache-read-only: true
- name: Build with Gradle
env:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
run: ./gradlew build '-Pvaadin.productionMode' --stacktrace --info --no-daemon --scan

14 changes: 13 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
vaadinVersion=24.6.5
hilla.active=false
hilla.active=false

# Kotlin
kotlin.caching.enabled=true
kotlin.incremental=true
kotlin.incremental.useClasspathSnapshot=true
kotlin.parallel.tasks.in.project=true
# Gradle
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.daemon.idletimeout=3600000
org.gradle.configuration-cache=true
org.gradle.configuration-cache.max-problems=100

0 comments on commit 7bcacf6

Please sign in to comment.