Skip to content

Use JDK 22 on github actions as AGP requires java 17 and above #3

Use JDK 22 on github actions as AGP requires java 17 and above

Use JDK 22 on github actions as AGP requires java 17 and above #3

Workflow file for this run

name: Build
on:
# Only run on push to main branch
push:
branches:
- main
# Always run on PRs
pull_request:
jobs:
build:
name: Build and Test
runs-on: 'macos-latest'
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v4
- name: Install JDK 22
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build --stacktrace
publish:
if: github.repository == 'sproctor/compose-data-table' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: [build]
runs-on: macos-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v4
- name: Install JDK 22
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish release
run: ./gradlew publish --no-configuration-cache
if: success()
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}