Combine java-toolchain entry definitions

- Remove configuration parameter for cache-entry-definitions. This allows richer modelling of extracted entries.
- Include both *.zip and *.tar.gz in entry definition for java-toolchains.
This commit is contained in:
Daz DeBoer 2021-12-29 13:36:24 -07:00
parent c157d0a332
commit 12fc52a49a
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
5 changed files with 52 additions and 47 deletions

View file

@ -22,21 +22,13 @@ jobs:
- name: Setup Gradle
uses: ./
with:
# Add "wrapper" to main cache entry and remove 'wrapper-zips' cache entry
# Exclude build-cache from main cache entry
# Add "enterprise" to main cache entry but omit "notifications"
gradle-home-cache-includes: |
caches
notifications
wrapper
enterprise
# Exclude build-cache from main cache entry
gradle-home-cache-excludes: |
caches/build-cache-1
gradle-home-extracted-cache-entries: |
[
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
["instrumented-jars", "caches/jars-*/*/"],
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
]
- name: Build using Gradle wrapper
working-directory: __tests__/samples/groovy-dsl
run: ./gradlew test
@ -57,17 +49,9 @@ jobs:
# Use the same configuration when restoring state from cache
gradle-home-cache-includes: |
caches
notifications
wrapper
enterprise
gradle-home-cache-excludes: |
caches/build-cache-1
gradle-home-extracted-cache-entries: |
[
["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
["instrumented-jars", "caches/jars-*/*/"],
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
]
cache-read-only: true
- name: Execute Gradle build with --offline
working-directory: __tests__/samples/groovy-dsl

View file

@ -81,9 +81,10 @@ jobs:
uses: actions/checkout@v2
- name: Setup Gradle with no cache extracted cache entries restored
uses: ./
env:
GRADLE_BUILD_ACTION_NO_EXTRACTED_ENTRIES: true
with:
cache-read-only: true
gradle-home-extracted-cache-entries: '[]'
- name: Check execute Gradle build with configuration cache enabled (but not restored)
working-directory: __tests__/samples/groovy-dsl
run: ./gradlew test --configuration-cache

View file

@ -72,9 +72,10 @@ jobs:
uses: actions/checkout@v2
- name: Setup Gradle with no extracted cache entries restored
uses: ./
env:
GRADLE_BUILD_ACTION_NO_EXTRACTED_ENTRIES: true
with:
cache-read-only: true
gradle-home-extracted-cache-entries: '[]'
- name: Check executee Gradle build
working-directory: __tests__/samples/groovy-dsl
run: ./gradlew test