From 1f1289e9ffae1cc0ccab4ad11fc2bf9b9bce9567 Mon Sep 17 00:00:00 2001 From: Michael Reed <1062477+haywood@users.noreply.github.com> Date: Tue, 3 Dec 2024 07:04:15 -0500 Subject: [PATCH] Create gradle.yml This should enable CI for Kotlin --- .github/workflows/kotlin-ci.yml | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/kotlin-ci.yml diff --git a/.github/workflows/kotlin-ci.yml b/.github/workflows/kotlin-ci.yml new file mode 100644 index 000000000..022a0fe81 --- /dev/null +++ b/.github/workflows/kotlin-ci.yml @@ -0,0 +1,62 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + pull_request: + paths: + - kotlin/** + - .github/workflows/gradle.yml + + push: + branches: [ "main" ] + paths: + - kotlin/** + - .github/workflows/gradle.yml + +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' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + - name: Build with Gradle Wrapper + run: ./gradlew jar + working-directory: kotlin + + 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' + - run: cd kotlin + + # 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 + with: + build-root-directory: kotlin