Fix maven central publishing #57
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Project | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| concurrency: | |
| group: 'ci-${{ github.event.merge_group.head_ref || github.head_ref }}-${{ github.workflow }}' | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| name: '[${{ matrix.os }}] build plugin' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version-file: .java-version | |
| - uses: gradle/actions/wrapper-validation@v5 | |
| - uses: gradle/actions/setup-gradle@v5 | |
| - run: ./gradlew projectCodestyle --scan | |
| - run: ./gradlew check | |
| - run: ./gradlew publishToMavenLocal validatePlugins | |
| - run: ./gradlew publishPlugins --dry-run | |
| - run: git diff --exit-code | |
| - name: (Fail-only) Upload the build reports | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: test-error-report-${{ matrix.os }} | |
| path: | | |
| keeper-gradle-plugin/build/reports | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| gradle: [ current ] | |
| java: [ 25 ] | |
| agp: [ stable, beta, alpha ] | |
| include: | |
| - gradle: current | |
| java: 21 | |
| agp: "8.13.2" | |
| - gradle: current | |
| java: 21 | |
| agp: "8.5.0" | |
| - gradle: release-candidate | |
| java: 25 | |
| agp: alpha | |
| name: '[samples] Gradle: ${{ matrix.gradle }}, Java: ${{ matrix.java }}, AGP: ${{ matrix.agp }}' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| - uses: gradle/actions/wrapper-validation@v5 | |
| - id: agp-version-finder | |
| uses: usefulness/agp-version-finder-action@v1 | |
| with: | |
| version-to-resolve: ${{ matrix.agp }} | |
| - uses: gradle/actions/setup-gradle@v5 | |
| - name: Assemble instrumentation tests | |
| id: gradle-assemble-instrumentation | |
| run: ./gradlew :sample:minifyExternalStagingWithR8 validateL8 -PagpVersion=${{ steps.agp-version-finder.outputs.resolved-version }} --scan --continue | |
| working-directory: samples | |
| - name: Enable KVM group perms | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Run instrumentation tests | |
| id: gradle-instrumentation-fork | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 36 | |
| arch: x86_64 | |
| force-avd-creation: false | |
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| disable-spellchecker: true | |
| disk-size: 6000M | |
| heap-size: 600M | |
| target: 'aosp_atd' | |
| channel: canary # Necessary for ATDs | |
| working-directory: samples | |
| script: | | |
| adb uninstall com.slack.keeper.sample || true | |
| adb uninstall com.slack.keeper.sample.androidTest || true | |
| # Now proceed, with much of the build being cached up to this point | |
| echo "Running instrumentation tests" | |
| ./gradlew connectedExternalStagingAndroidTest -PagpVersion=${{ steps.agp-version-finder.outputs.resolved-version }} --scan | |
| adb uninstall com.slack.keeper.sample || true | |
| adb uninstall com.slack.keeper.sample.androidTest || true | |
| - name: (Fail-only) Upload the build reports | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: error-report-${{ matrix.gradle }}-${{ matrix.java }}-${{ matrix.agp }} | |
| path: | | |
| samples/sample/build/reports |