Skip to content

Commit

Permalink
Use setup-gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
rogervinas committed Jul 22, 2024
1 parent ee20dec commit 6f045e7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 54 deletions.
53 changes: 26 additions & 27 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Java

on:
push:
branches: [ "main" ]
branches: ["main"]
paths:
- .github/workflows/java.yml
- java/**
pull_request:
branches: [ "main" ]
branches: ["main"]
paths:
- .github/workflows/java.yml
- java/**
Expand All @@ -17,31 +17,30 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-java-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-java
- name: Build
uses: gradle/gradle-build-action@66535aaf56f831b35e3a8481c9c99b665b84dd45
with:
arguments: build
build-root-directory: java
- name: Checkout
uses: actions/checkout@v4

- name: Configure Java
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"

- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-java-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-java
- name: Build
uses: gradle/setup-gradle@v3
with:
arguments: build
build-root-directory: java
53 changes: 26 additions & 27 deletions .github/workflows/kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Kotlin

on:
push:
branches: [ "main" ]
branches: ["main"]
paths:
- .github/workflows/kotlin.yml
- kotlin/**
pull_request:
branches: [ "main" ]
branches: ["main"]
paths:
- .github/workflows/kotlin.yml
- kotlin/**
Expand All @@ -17,31 +17,30 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-kotlin-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-kotlin
- name: Build
uses: gradle/gradle-build-action@66535aaf56f831b35e3a8481c9c99b665b84dd45
with:
arguments: build
build-root-directory: kotlin
- name: Checkout
uses: actions/checkout@v4

- name: Configure Java
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"

- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-kotlin-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-kotlin
- name: Build
uses: gradle/setup-gradle@v3
with:
arguments: build
build-root-directory: kotlin

0 comments on commit 6f045e7

Please sign in to comment.