Skip to content

Commit

Permalink
improve circleci caching by adding job name == jdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
aaschmid committed Jan 4, 2020
1 parent 009e082 commit 2177361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ build-job: &build-job

- restore_cache:
keys:
- gradle-repo-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
- gradle-repo-v1-
# Restart caching for every new wrapper and add job name (= JDK version) as JDK influences Gradle's caching
- gradle-repo-v2-{{ .Environment.CIRCLE_JOB }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}

- run: ./gradlew --build-cache --scan build -Pjunit4Version=4.10 -PjunitJupiterVersion=5.5.0 -PskipSpotBugs
- run: ./gradlew --build-cache --scan build -Pjunit4Version=4.11 -PjunitJupiterVersion=5.5.1 -PskipSpotBugs
Expand All @@ -17,7 +17,7 @@ build-job: &build-job
- save_cache:
paths:
- ~/.gradle
key: gradle-repo-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
key: gradle-repo-v2-{{ .Environment.CIRCLE_JOB }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}

- run:
command: |
Expand Down

0 comments on commit 2177361

Please sign in to comment.