name: Gradle Build

on:
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - name: Set up JDK
      uses: actions/setup-java@v4
      with:
        java-version: '25'
        distribution: 'temurin'

    - name: Build with Gradle
      run: |
        mkdir data
        bash ./src/main/resources/meta/update.sh
        chmod +x gradlew
        ./gradlew build
