From 6983fa1715139f055356d4659aea9aff55c64e26 Mon Sep 17 00:00:00 2001 From: Mariusz Matyszczak <38810661+MarcusSlover@users.noreply.github.com> Date: Tue, 1 Jul 2025 01:00:43 +0200 Subject: [PATCH] Update gradle.yml --- .github/workflows/gradle.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index dd9d072..05f8773 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,30 +1,37 @@ -# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - name: Java CI with Gradle on: push: branches: [ master ] pull_request: - branches: [ 'master', 'main', '4.0', 'release/**' ] + branches: + - master + - main + - '4.0' + - 'release/**' types: [ opened, synchronize, reopened ] - jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + # 1. Checkout code + - name: Checkout + uses: actions/checkout@v3 + + # 2. Set up Temurin JDK 21 and enable Gradle cache - name: Set up JDK 21 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '21' - distribution: 'adopt' + distribution: temurin + java-version: 21 cache: gradle - - name: Grant execute permission for gradlew + + # 3. Make Gradle wrapper executable (Linux runners) + - name: Grant execute permission to gradlew run: chmod +x gradlew + + # 4. Build - name: Build with Gradle run: ./gradlew build