name: Demo Job Summary, for Gradle builds on: workflow_dispatch: permissions: contents: read jobs: build-distribution: runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Build and upload distribution uses: ./.github/actions/build-dist many-gradle-builds: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: cache-read-only: false cache-cleanup: 'on-success' - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble - name: Build kotlin-dsl project without Build Scan® working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble check --no-scan - name: Build kotlin-dsl project with Build Scan® publish failure working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew check -Dgradle.enterprise.url=https://not.valid.server - name: Build groovy-dsl project working-directory: .github/workflow-samples/groovy-dsl run: ./gradlew assemble - name: Build kotlin-dsl project with multiple gradle invocations working-directory: .github/workflow-samples/kotlin-dsl run: | ./gradlew tasks --no-daemon ./gradlew help check ./gradlew :wrapper --gradle-version 8.7 --gradle-distribution-sha256-sum 544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d - name: Fail groovy-dsl project working-directory: .github/workflow-samples/groovy-dsl continue-on-error: true run: ./gradlew not-a-real-task - name: Dependency submission uses: ./dependency-submission with: build-root-directory: .github/workflow-samples/groovy-dsl dependency-graph: generate-and-upload # Exercises every Gradle version support status in a single Job Summary: end-of-life versions all # share one expandable section and are each marked with a warning sign, out-of-date versions share # a single info sign and legend, and the current version is left unmarked. # Three end-of-life versions and two out-of-date ones exercise the plural wording throughout, and # the two 7.x versions alongside a 6.x one check that each affected release line is named once, # as "Gradle 6.x and 7.x releases". # Versions are picked relative to Gradle 9.x being current; revisit once Gradle 10 is released. support-status-eol-and-outdated: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # Java 11, since Gradle 6.x cannot run on the Java 17 used elsewhere in this workflow. - name: Initialize integ-test uses: ./.github/actions/init-integ-test with: java-version: '11' - name: Setup Gradle 6.9.4 (end-of-life) uses: ./setup-gradle with: gradle-version: '6.9.4' - name: Build with Gradle 6.9.4 working-directory: .github/workflow-samples/no-wrapper run: gradle help - name: Setup Gradle 7.4 (end-of-life) uses: ./setup-gradle with: gradle-version: '7.4' - name: Build with Gradle 7.4 working-directory: .github/workflow-samples/no-wrapper run: gradle help - name: Setup Gradle 7.6.6 (end-of-life) uses: ./setup-gradle with: gradle-version: '7.6.6' - name: Build with Gradle 7.6.6 working-directory: .github/workflow-samples/no-wrapper run: gradle help - name: Setup Gradle 8.0.2 (out of date) uses: ./setup-gradle with: gradle-version: '8.0.2' - name: Build with Gradle 8.0.2 working-directory: .github/workflow-samples/no-wrapper run: gradle help - name: Setup Gradle 8.14.5 (out of date) uses: ./setup-gradle with: gradle-version: '8.14.5' - name: Build with Gradle 8.14.5 working-directory: .github/workflow-samples/no-wrapper run: gradle help # Gradle 9 and later require Java 17 - name: Setup Java 17 uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 with: distribution: temurin java-version: 17 - name: Setup Gradle current (no status reported) uses: ./setup-gradle with: gradle-version: current - name: Build with the current Gradle version working-directory: .github/workflow-samples/no-wrapper run: gradle help successful-builds-with-no-summary: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: add-job-summary: on-failure - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble - name: Build kotlin-dsl project without Build Scan® working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble check --no-scan pre-existing-gradle-home: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Pre-create Gradle User Home shell: bash run: | mkdir ~/.gradle mkdir ~/.gradle/caches touch ~/.gradle/caches/dummy.txt - name: Setup Gradle uses: ./setup-gradle - name: Run build working-directory: .github/workflow-samples/groovy-dsl run: ./gradlew assemble cache-read-only: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: cache-read-only: true - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble cache-disabled: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: cache-disabled: true - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble cache-provider-external: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: cache-provider: external - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble basic-caching: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: cache-provider: basic - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble terms-of-use-accepted: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: build-scan-terms-of-use-url: https://gradle.com/help/legal-terms-of-use build-scan-terms-of-use-agree: yes - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble develocity-access-key-set: needs: build-distribution runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Initialize integ-test uses: ./.github/actions/init-integ-test - name: Setup Gradle uses: ./setup-gradle with: develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }} - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble