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

Add open-source 'basic' cache provider and revamp licensing documentation (#930)

## Summary

- **New `basic` cache provider**: Adds an open-source (MIT-licensed)
caching implementation built on `@actions/cache` as an alternative to
the proprietary Enhanced Caching. Users can opt in with `cache-provider:
basic` on both `setup-gradle` and `dependency-submission` actions.
- **Revamped licensing & distribution docs**: Replaces the verbose
licensing notice block (previously shown in README, docs, and logs) with
a friendlier callout and a new dedicated
[DISTRIBUTION.md](./DISTRIBUTION.md) covering component licensing, usage
tiers, data privacy ("Safe Harbor"), and opt-out instructions.
- **Improved messaging**: Enhanced Caching and Basic Caching each
display concise, informative log messages and job summary notes instead
of the previous wall-of-text license warning.
- **New integration tests**: Adds `integ-test-basic-cache-provider.yml`
workflow that seeds and verifies the basic cache provider across
platforms, plus unit tests for `BasicCacheService` and `getCacheService`
selection logic.
- **CI workflow reorganization**: Dependency-submission integration
tests extracted into their own reusable suite
(`suite-integ-test-dependency-submission.yml`); sample project tests
moved into the caching suite.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: default avatarClaude Opus 4.6 (1M context) <[email protected]>
parent ac396bf1
Loading
Loading
Loading
Loading
+10
Changes for .github/workflows/ci-integ-test-full.yml: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -24,6 +24,16 @@ jobs:
      skip-dist: true
    secrets: inherit

  dependency-submission-integ-tests:
    uses: ./.github/workflows/suite-integ-test-dependency-submission.yml
    concurrency:
      group: CI-integ-test-full
      cancel-in-progress: false
    with:
      runner-os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
      skip-dist: true
    secrets: inherit

  other-integ-tests:
    permissions:
      contents: write
+15 −3
Changes for .github/workflows/ci-integ-test.yml: 15 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ jobs:
    needs: build-distribution
    uses: ./.github/workflows/suite-integ-test-caching.yml
    concurrency:
      group: CI-integ-test
      group: CI-integ-test-caching
      cancel-in-progress: false
    with:
      skip-dist: false
@@ -37,10 +37,22 @@ jobs:
  other-integ-tests:
    permissions:
      contents: write
    needs: build-distribution
    needs: caching-integ-tests
    uses: ./.github/workflows/suite-integ-test-other.yml
    concurrency:
      group: CI-integ-test
      group: CI-integ-test-other
      cancel-in-progress: false
    with:
      skip-dist: false
    secrets: inherit

  dependency-submission-integ-tests:
    permissions:
      contents: write
    needs: other-integ-tests
    uses: ./.github/workflows/suite-integ-test-dependency-submission.yml
    concurrency:
      group: CI-integ-test-dependency-submission
      cancel-in-progress: false
    with:
      skip-dist: false
+17
Changes for .github/workflows/demo-job-summary.yml: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -132,6 +132,23 @@ jobs:
      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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
    - 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
+67
Changes for .github/workflows/integ-test-basic-cache-provider.yml: 67 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: Test basic cache provider

on:
  workflow_call:
    inputs:
      cache-key-prefix:
        type: string
        default: '0'
      runner-os:
        type: string
        default: '["ubuntu-latest"]'
      skip-dist:
        type: boolean
        default: false

env:
  SKIP_DIST: ${{ inputs.skip-dist }}
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: basic-cache-provider-${{ inputs.cache-key-prefix }}

permissions:
  contents: read

jobs:
  basic-cache-seed-build:
    strategy:
      max-parallel: 1
      fail-fast: false
      matrix:
        os: ${{fromJSON(inputs.runner-os)}}
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
    - name: Initialize integ-test
      uses: ./.github/actions/init-integ-test

    - name: Setup Gradle with basic cache provider
      uses: ./setup-gradle
      with:
        cache-provider: basic
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
    - name: Build kotlin-dsl project
      working-directory: .github/workflow-samples/kotlin-dsl
      run: ./gradlew build

  basic-cache-verify-build:
    needs: basic-cache-seed-build
    strategy:
      max-parallel: 1
      fail-fast: false
      matrix:
        os: ${{fromJSON(inputs.runner-os)}}
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
    - name: Initialize integ-test
      uses: ./.github/actions/init-integ-test

    - name: Setup Gradle with basic cache provider
      uses: ./setup-gradle
      with:
        cache-provider: basic
        cache-read-only: true
    - name: Build kotlin-dsl project
      working-directory: .github/workflow-samples/kotlin-dsl
      run: ./gradlew build --offline
+18
Changes for .github/workflows/suite-integ-test-caching.yml: 18 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -45,3 +45,21 @@ jobs:
    uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
    with:
      skip-dist: ${{ inputs.skip-dist }}

  sample-kotlin-dsl:
    uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
    with:
      runner-os: '${{ inputs.runner-os }}'
      skip-dist: ${{ inputs.skip-dist }}

  sample-gradle-plugin:
    uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
    with:
      runner-os: '${{ inputs.runner-os }}'
      skip-dist: ${{ inputs.skip-dist }}

  basic-cache-provider:
    uses: ./.github/workflows/integ-test-basic-cache-provider.yml
    with:
      runner-os: '${{ inputs.runner-os }}'
      skip-dist: ${{ inputs.skip-dist }}
Loading