File tree Expand file tree Collapse file tree 2 files changed +44
-22
lines changed Expand file tree Collapse file tree 2 files changed +44
-22
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will build a Java project with Gradle
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+ name : build
5+
6+ on :
7+ push :
8+ branches : [ main ]
9+ pull_request :
10+ branches : [ main ]
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ strategy :
16+ matrix :
17+ java : [ '8', '11' ]
18+ name : Java ${{ matrix.Java }} build
19+ steps :
20+ - uses : actions/checkout@v2
21+ - name : Set up JDK
22+ uses : actions/setup-java@v2
23+ with :
24+ java-version : ${{ matrix.java }}
25+ distribution : adopt
26+ - name : Cache Gradle packages
27+ uses : actions/cache@v2
28+ with :
29+ path : |
30+ ~/.gradle/caches
31+ ~/.gradle/wrapper
32+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
33+ restore-keys : |
34+ ${{ runner.os }}-gradle-
35+ - name : Validate Gradle wrapper
36+ uses : gradle/wrapper-validation-action@v1
37+ - name : Build with Gradle
38+ run : ./gradlew build
39+ - name : Cleanup Gradle Cache
40+ # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
41+ # Restoring these files from a GitHub Actions cache might cause problems for future builds.
42+ run : |
43+ rm -f ~/.gradle/caches/modules-2/modules-2.lock
44+ rm -f ~/.gradle/caches/modules-2/gc.properties
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments