Skip to content

Commit e9491d8

Browse files
authored
Merge pull request #595 from jsonschema2dataclass/caches
Use caches to build all components
2 parents 94b4d77 + 8d7d0da commit e9491d8

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
lines changed

.github/workflows/demo-android-agp7-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,13 @@ jobs:
4747
steps:
4848
- name: Checkout
4949
uses: actions/checkout@v3
50-
with:
51-
fetch-depth: 0
5250
- name: Set up JDK ${{ matrix.distribution }} ${{ matrix.java }}
5351
uses: actions/[email protected]
5452
with:
5553
distribution: ${{ matrix.distribution }}
5654
java-version: ${{ matrix.java }}
55+
cache: gradle
5756
- name: Install Android SDK
58-
uses: malinskiy/action-android/install-sdk@release/0.1.2
57+
uses: malinskiy/action-android/install-sdk@release/0.1.4
5958
- name: Build project
6059
run: ./gradlew assembleDebug -S --warning-mode all

.github/workflows/demo-java-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@ jobs:
4747
steps:
4848
- name: Checkout
4949
uses: actions/checkout@v3
50-
with:
51-
fetch-depth: 0
5250
- name: Install JDK ${{ matrix.distribution }} ${{ matrix.java_version }}
5351
uses: actions/[email protected]
5452
with:
5553
distribution: ${{ matrix.distribution }}
5654
java-version: ${{ matrix.java_version }}
55+
cache: gradle
5756
- name: Build project
5857
run: ./gradlew build -S --warning-mode all

.github/workflows/build.yml renamed to .github/workflows/plugin-build-ci.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Plugin
1+
name: Build Plugin CI
22

33
on:
44
push:
@@ -14,7 +14,7 @@ on:
1414
- settings.gradle.kts
1515
- build.gradle.kts
1616
- gradle.properties
17-
- .github/workflows/build.yml
17+
- .github/workflows/plugin-build-ci.yml
1818
pull_request:
1919
types: [ assigned, opened, synchronize, reopened ]
2020
paths:
@@ -25,7 +25,7 @@ on:
2525
- settings.gradle.kts
2626
- build.gradle.kts
2727
- gradle.properties
28-
- .github/workflows/build.yml
28+
- .github/workflows/plugin-build-ci.yml
2929

3030
env:
3131
GRADLE_OPTS: -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
@@ -41,20 +41,10 @@ jobs:
4141
distribution: [ "zulu", "temurin" ]
4242
steps:
4343
- uses: actions/checkout@v3
44-
with:
45-
fetch-depth: 0
4644
- name: Set up JDK ${{ matrix.distribution }} ${{ matrix.java }}
4745
uses: actions/[email protected]
4846
with:
4947
distribution: ${{ matrix.distribution }}
5048
java-version: ${{ matrix.java }}
51-
- uses: actions/cache@v3
52-
with:
53-
path: |
54-
~/.gradle/caches
55-
~/.gradle/wrapper
56-
key: ${{ runner.os }}-v2-gradle-build-${{ hashFiles('**/*') }}
57-
restore-keys: |
58-
${{ runner.os }}-v2-gradle-build-
59-
${{ runner.os }}-v2-gradle-
60-
- run: ./gradlew build --warning-mode all
49+
cache: gradle
50+
- run: ./gradlew build --warning-mode all --no-daemon

.github/workflows/release.yml renamed to .github/workflows/plugin-release-ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release Plugin
22

33
on:
44
push:
@@ -19,8 +19,9 @@ jobs:
1919
with:
2020
distribution: 'temurin'
2121
java-version: 8
22+
cache: gradle
2223
- name: Build project
23-
run: ./gradlew build
24+
run: ./gradlew build --no-daemon
2425
env:
2526
VERSION: ${{ github.ref }}
2627
- name: Find Tag
@@ -51,4 +52,4 @@ jobs:
5152
properties: |
5253
gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
5354
gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
54-
arguments: publishPlugins -s --scan
55+
arguments: publishPlugins -s --scan --no-daemon

0 commit comments

Comments
 (0)