Unverified Commit f64284c3 authored by Daz DeBoer's avatar Daz DeBoer Committed by GitHub
Browse files

Mute license warning when terms are accepted (#911)

With licensing changes in v6, a license warning was added to the logs
and job summary. Now, accepting the Build Scan Terms of Use or providing
a Develocity Access Key will mute this warning.
parent c2457a7f
Loading
Loading
Loading
Loading
+35
Changes for .github/workflows/demo-job-summary.yml: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -131,3 +131,38 @@ jobs:
    - 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
    - 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
    - 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
+3
Changes for README.md: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@ This repository contains a set of GitHub Actions that are useful for building Gr
> Use of the `gradle-actions-caching` component is subject to a separate license, available at https://gradle.com/legal/terms-of-use/. 
> If you do not agree to these license terms, do not use the `gradle-actions-caching` component.

This license notice will be displayed in workflow logs and each job summary. To suppress this message, 
either [accept the terms of use](docs/setup-gradle.md#publishing-to-scansgradlecom) in your workflow, or [provide a Develocity access key](docs/setup-gradle.md#managing-develocity-access-keys).

## The `setup-gradle` action

The `setup-gradle` action can be used to configure Gradle for optimal execution on any platform supported by GitHub Actions.
+3
Changes for docs/dependency-submission.md: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@ If you're confused by the behaviour you're seeing or have specific questions, pl
> Use of the `gradle-actions-caching` component is subject to a separate license, available at https://gradle.com/legal/terms-of-use/. 
> If you do not agree to these license terms, do not use the `gradle-actions-caching` component.

This license notice will be displayed in workflow logs and each job summary. To suppress this message, 
either [accept the terms of use](setup-gradle.md#publishing-to-scansgradlecom) in your workflow, or [provide a Develocity access key](setup-gradle.md#managing-develocity-access-keys).

## General usage

The following workflow will generate a dependency graph for a Gradle project and submit it immediately to the repository via the
+3
Changes for docs/setup-gradle.md: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@ This GitHub Action can be used to configure Gradle for optimal execution on any
> Use of the `gradle-actions-caching` component is subject to a separate license, available at https://gradle.com/legal/terms-of-use/. 
> If you do not agree to these license terms, do not use the `gradle-actions-caching` component.

This license notice will be displayed in workflow logs and each job summary. To suppress this message, 
either [accept the terms of use](#publishing-to-scansgradlecom) in your workflow, or [provide a Develocity access key](#managing-develocity-access-keys).

## Why use the `setup-gradle` action?

It is possible to directly invoke Gradle in your workflow, and the `actions/setup-java@v5` action provides a simple way to cache Gradle dependencies.
+2 −2
Changes for sources/src/actions/dependency-submission/main.ts: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ import * as dependencyGraph from '../../dependency-graph'

import {parseArgsStringToArgv} from 'string-argv'
import {
    BuildScanConfig,
    DevelocityConfig,
    CacheConfig,
    DependencyGraphConfig,
    DependencyGraphOption,
@@ -25,7 +25,7 @@ export async function run(): Promise<void> {
        setActionId('gradle/actions/dependency-submission')

        // Configure Gradle environment (Gradle User Home)
        await setupGradle.setup(new CacheConfig(), new BuildScanConfig(), new WrapperValidationConfig())
        await setupGradle.setup(new CacheConfig(), new DevelocityConfig(), new WrapperValidationConfig())

        // Capture the enabled state of dependency-graph
        const originallyEnabled = process.env['GITHUB_DEPENDENCY_GRAPH_ENABLED']
Loading