From 454c75586c06b27fb2c8a7a87671f7f5a084fe93 Mon Sep 17 00:00:00 2001 From: Ian Dees Date: Mon, 9 Sep 2024 08:51:25 -0500 Subject: [PATCH 1/3] Add Gradle Github Action --- .github/workflows/gradle.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..a0a070c --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,49 @@ +name: Java CI with Gradle + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + + - name: Build with Gradle Wrapper + run: ./gradlew build + + dependency-submission: + + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. + # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 From fcf56840a6a840c16a32a2abed7d7b84010af0b8 Mon Sep 17 00:00:00 2001 From: Ian Dees Date: Mon, 9 Sep 2024 08:51:36 -0500 Subject: [PATCH 2/3] Specify a plugin version in the build.gradle --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index f458d6f..cccbaf8 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,7 @@ sourceSets { archivesBaseName = 'fieldpapers' josm { + version = '0.5.0' i18n { pathTransformer = getPathTransformer("github.com/fieldpapers/josm-fieldpapers/blob") } From f1a1f3df925c65951278e72cc8581a601fc68bdf Mon Sep 17 00:00:00 2001 From: Ian Dees Date: Mon, 9 Sep 2024 08:57:49 -0500 Subject: [PATCH 3/3] Take the dependency submission piece out --- .github/workflows/gradle.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a0a070c..f51bf1c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -28,22 +28,3 @@ jobs: - name: Build with Gradle Wrapper run: ./gradlew build - - dependency-submission: - - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. - # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md - - name: Generate and submit dependency graph - uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0