diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml index 0a1af8c..fe48f33 100644 --- a/.github/workflows/ci-quick-check.yml +++ b/.github/workflows/ci-quick-check.yml @@ -22,7 +22,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - name: Configure Gradle as default for unit test - uses: ./ + uses: ./setup-gradle with: gradle-version: 8.5 - name: Run tests diff --git a/.github/workflows/demo-failure-cases.yml b/.github/workflows/demo-failure-cases.yml index d6d6b53..49cf9a5 100644 --- a/.github/workflows/demo-failure-cases.yml +++ b/.github/workflows/demo-failure-cases.yml @@ -11,7 +11,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - name: Test build failure - uses: ./ + uses: ./setup-gradle continue-on-error: true with: build-root-directory: .github/workflow-samples/kotlin-dsl @@ -23,7 +23,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - name: Test wrapper missing - uses: ./ + uses: ./setup-gradle continue-on-error: true with: build-root-directory: .github/workflow-samples/no-wrapper @@ -35,7 +35,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - name: Test bad config value - uses: ./ + uses: ./setup-gradle continue-on-error: true with: build-root-directory: .github/workflow-samples/no-wrapper diff --git a/.github/workflows/demo-job-summary.yml b/.github/workflows/demo-job-summary.yml index e9015fd..7ee234e 100644 --- a/.github/workflows/demo-job-summary.yml +++ b/.github/workflows/demo-job-summary.yml @@ -20,7 +20,7 @@ jobs: npm run build working-directory: sources - name: Setup Gradle - uses: ./ + uses: ./setup-gradle - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew assemble @@ -55,7 +55,7 @@ jobs: npm run build working-directory: sources - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: add-job-summary: on-failure - name: Build kotlin-dsl project @@ -83,7 +83,7 @@ jobs: mkdir ~/.gradle/caches touch ~/.gradle/caches/dummy.txt - name: Setup Gradle - uses: ./ + uses: ./setup-gradle - name: Run build working-directory: .github/workflow-samples/groovy-dsl run: ./gradlew assemble diff --git a/.github/workflows/demo-pr-build-scan-comment.yml b/.github/workflows/demo-pr-build-scan-comment.yml index 2e31ba6..7ef16d9 100644 --- a/.github/workflows/demo-pr-build-scan-comment.yml +++ b/.github/workflows/demo-pr-build-scan-comment.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout project sources uses: actions/checkout@v4 - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: add-job-summary-as-pr-comment: always - name: Run build with Gradle wrapper @@ -27,7 +27,7 @@ jobs: - name: Checkout project sources uses: actions/checkout@v4 - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: add-job-summary-as-pr-comment: on-failure - name: Run build with Gradle wrapper @@ -41,7 +41,7 @@ jobs: - name: Checkout project sources uses: actions/checkout@v4 - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: add-job-summary-as-pr-comment: on-failure - name: Run build with Gradle wrapper diff --git a/.github/workflows/integ-test-action-inputs.yml b/.github/workflows/integ-test-action-inputs.yml index 5a96edd..b28fa7a 100644 --- a/.github/workflows/integ-test-action-inputs.yml +++ b/.github/workflows/integ-test-action-inputs.yml @@ -29,7 +29,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Invoke with multi-line arguments - uses: ./ + uses: ./setup-gradle with: build-root-directory: .github/workflow-samples/groovy-dsl arguments: | diff --git a/.github/workflows/integ-test-cache-cleanup.yml b/.github/workflows/integ-test-cache-cleanup.yml index 49d836f..c23d335 100644 --- a/.github/workflows/integ-test-cache-cleanup.yml +++ b/.github/workflows/integ-test-cache-cleanup.yml @@ -29,7 +29,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build with 3.1 @@ -49,7 +49,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false gradle-home-cache-cleanup: true @@ -69,7 +69,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Report Gradle User Home diff --git a/.github/workflows/integ-test-caching-config.yml b/.github/workflows/integ-test-caching-config.yml index fb398f3..9c6fd5b 100644 --- a/.github/workflows/integ-test-caching-config.yml +++ b/.github/workflows/integ-test-caching-config.yml @@ -29,7 +29,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches # Add "enterprise" to main cache entry but omit "notifications" @@ -57,7 +57,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: # Use the same configuration as used in the seed build gradle-home-cache-includes: | @@ -83,7 +83,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-disabled: true - name: Run Gradle build @@ -108,7 +108,7 @@ jobs: - name: Create dummy Gradle User Home run: mkdir -p ~/.gradle/caches - name: Setup Gradle - uses: ./ + uses: ./setup-gradle - name: Run Gradle build id: gradle working-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }} @@ -134,7 +134,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-write-only: true - name: Build using Gradle wrapper @@ -155,7 +155,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Execute Gradle build with --offline diff --git a/.github/workflows/integ-test-dependency-graph-failures.yml b/.github/workflows/integ-test-dependency-graph-failures.yml index b7d6a3d..a8b17db 100644 --- a/.github/workflows/integ-test-dependency-graph-failures.yml +++ b/.github/workflows/integ-test-dependency-graph-failures.yml @@ -26,7 +26,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: gradle-version: 7.0.1 dependency-graph: generate @@ -50,7 +50,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: gradle-version: 7.0.1 dependency-graph: generate @@ -73,7 +73,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: dependency-graph: generate-and-submit dependency-graph-continue-on-failure: true @@ -93,7 +93,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: dependency-graph: generate-and-submit dependency-graph-continue-on-failure: false diff --git a/.github/workflows/integ-test-dependency-graph.yml b/.github/workflows/integ-test-dependency-graph.yml index bcd21e2..09c19dd 100644 --- a/.github/workflows/integ-test-dependency-graph.yml +++ b/.github/workflows/integ-test-dependency-graph.yml @@ -32,7 +32,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: dependency-graph: generate-and-upload - name: Run gradle build @@ -50,7 +50,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: dependency-graph: generate-and-submit - name: Run gradle build @@ -66,7 +66,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Submit dependency graphs - uses: ./ + uses: ./setup-gradle with: dependency-graph: download-and-submit @@ -81,7 +81,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: dependency-graph: generate-and-submit - id: gradle-assemble @@ -121,7 +121,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle for dependency-graph generate - uses: ./ + uses: ./setup-gradle with: dependency-graph: generate-and-submit - id: config-cache-store diff --git a/.github/workflows/integ-test-detect-java-toolchains.yml b/.github/workflows/integ-test-detect-java-toolchains.yml index 8277d20..de0b544 100644 --- a/.github/workflows/integ-test-detect-java-toolchains.yml +++ b/.github/workflows/integ-test-detect-java-toolchains.yml @@ -31,7 +31,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle - name: List detected toolchains shell: bash working-directory: .github/workflow-samples/groovy-dsl @@ -70,7 +70,7 @@ jobs: distribution: 'temurin' java-version: '16' - name: Setup Gradle - uses: ./ + uses: ./setup-gradle - name: List detected toolchains shell: bash working-directory: .github/workflow-samples/groovy-dsl diff --git a/.github/workflows/integ-test-execution-with-caching.yml b/.github/workflows/integ-test-execution-with-caching.yml index 20a4d2b..3754fc7 100644 --- a/.github/workflows/integ-test-execution-with-caching.yml +++ b/.github/workflows/integ-test-execution-with-caching.yml @@ -29,7 +29,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Execute Gradle build - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches build-root-directory: .github/workflow-samples/groovy-dsl @@ -48,7 +48,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Execute Gradle build - uses: ./ + uses: ./setup-gradle with: cache-read-only: true build-root-directory: .github/workflow-samples/groovy-dsl diff --git a/.github/workflows/integ-test-execution.yml b/.github/workflows/integ-test-execution.yml index 45bed64..f212f8e 100644 --- a/.github/workflows/integ-test-execution.yml +++ b/.github/workflows/integ-test-execution.yml @@ -34,14 +34,14 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Test use defined Gradle version - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches gradle-version: 6.9 build-root-directory: .github/workflow-samples/no-wrapper arguments: help -DgradleVersionCheck=6.9 - name: Test use Gradle version alias - uses: ./ + uses: ./setup-gradle with: gradle-version: release-candidate build-root-directory: .github/workflow-samples/no-wrapper @@ -71,7 +71,7 @@ jobs: distribution: temurin java-version: 8 - name: Run Gradle build - uses: ./ + uses: ./setup-gradle id: gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches diff --git a/.github/workflows/integ-test-inject-develocity.yml b/.github/workflows/integ-test-inject-develocity.yml index 37655c0..94d7654 100644 --- a/.github/workflows/integ-test-inject-develocity.yml +++ b/.github/workflows/integ-test-inject-develocity.yml @@ -45,7 +45,7 @@ jobs: java-version: 8 - name: Setup Gradle id: setup-gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches gradle-version: ${{ matrix.gradle }} @@ -77,7 +77,7 @@ jobs: java-version: 8 - name: Setup Gradle id: setup-gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches gradle-version: ${{ matrix.gradle }} diff --git a/.github/workflows/integ-test-provision-gradle-versions.yml b/.github/workflows/integ-test-provision-gradle-versions.yml index 9ab6140..6b9d8dd 100644 --- a/.github/workflows/integ-test-provision-gradle-versions.yml +++ b/.github/workflows/integ-test-provision-gradle-versions.yml @@ -34,7 +34,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle with v6.9 - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches gradle-version: 6.9 @@ -42,14 +42,14 @@ jobs: working-directory: .github/workflow-samples/no-wrapper run: gradle help "-DgradleVersionCheck=6.9" - name: Setup Gradle with v7.1.1 - uses: ./ + uses: ./setup-gradle with: gradle-version: 7.1.1 - name: Test uses Gradle v7.1.1 working-directory: .github/workflow-samples/no-wrapper run: gradle help "-DgradleVersionCheck=7.1.1" - name: Setup Gradle with release-candidate - uses: ./ + uses: ./setup-gradle with: gradle-version: release-candidate - name: Test use release-candidate @@ -57,7 +57,7 @@ jobs: run: gradle help - name: Setup Gradle with current id: gradle-current - uses: ./ + uses: ./setup-gradle with: gradle-version: current - name: Check current version output parameter @@ -92,7 +92,7 @@ jobs: java-version: 8 - name: Setup Gradle id: setup-gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches gradle-version: ${{ matrix.gradle }} diff --git a/.github/workflows/integ-test-restore-configuration-cache.yml b/.github/workflows/integ-test-restore-configuration-cache.yml index 54ee79f..6493d36 100644 --- a/.github/workflows/integ-test-restore-configuration-cache.yml +++ b/.github/workflows/integ-test-restore-configuration-cache.yml @@ -39,7 +39,7 @@ jobs: distribution: 'liberica' java-version: '21' - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} @@ -67,7 +67,7 @@ jobs: distribution: 'liberica' java-version: '21' - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} @@ -105,7 +105,7 @@ jobs: distribution: 'liberica' java-version: '21' - name: Setup Gradle with no extracted cache entries restored - uses: ./ + uses: ./setup-gradle env: GRADLE_BUILD_ACTION_SKIP_RESTORE: "generated-gradle-jars|wrapper-zips|java-toolchains|instrumented-jars|dependencies|kotlin-dsl" with: @@ -134,7 +134,7 @@ jobs: distribution: 'liberica' java-version: '21' - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} @@ -162,7 +162,7 @@ jobs: distribution: 'liberica' java-version: '21' - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} @@ -191,7 +191,7 @@ jobs: distribution: 'liberica' java-version: '21' - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} diff --git a/.github/workflows/integ-test-restore-containerized-gradle-home.yml b/.github/workflows/integ-test-restore-containerized-gradle-home.yml index 1c77551..056609f 100644 --- a/.github/workflows/integ-test-restore-containerized-gradle-home.yml +++ b/.github/workflows/integ-test-restore-containerized-gradle-home.yml @@ -29,7 +29,7 @@ jobs: java-version: 11 distribution: temurin - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build using Gradle wrapper @@ -52,7 +52,7 @@ jobs: java-version: 11 distribution: temurin - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Execute Gradle build with --offline diff --git a/.github/workflows/integ-test-restore-custom-gradle-home.yml b/.github/workflows/integ-test-restore-custom-gradle-home.yml index 2843058..f4992a7 100644 --- a/.github/workflows/integ-test-restore-custom-gradle-home.yml +++ b/.github/workflows/integ-test-restore-custom-gradle-home.yml @@ -27,7 +27,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build using Gradle wrapper @@ -48,7 +48,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Execute Gradle build with --offline @@ -69,7 +69,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Execute Gradle build and verify tasks from cache diff --git a/.github/workflows/integ-test-restore-gradle-home.yml b/.github/workflows/integ-test-restore-gradle-home.yml index 85fd28d..b929a47 100644 --- a/.github/workflows/integ-test-restore-gradle-home.yml +++ b/.github/workflows/integ-test-restore-gradle-home.yml @@ -30,7 +30,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build using Gradle wrapper @@ -50,7 +50,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Execute Gradle build with --offline @@ -70,7 +70,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Execute Gradle build and verify tasks from cache @@ -90,7 +90,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle with no extracted cache entries restored - uses: ./ + uses: ./setup-gradle env: GRADLE_BUILD_ACTION_SKIP_RESTORE: "generated-gradle-jars|wrapper-zips|java-toolchains|instrumented-jars|dependencies|kotlin-dsl" with: @@ -118,7 +118,7 @@ jobs: touch ~/.gradle/gradle.properties touch ~/.gradle/caches/dummy.txt - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true cache-overwrite-existing: true diff --git a/.github/workflows/integ-test-restore-java-toolchain.yml b/.github/workflows/integ-test-restore-java-toolchain.yml index 99201af..313b707 100644 --- a/.github/workflows/integ-test-restore-java-toolchain.yml +++ b/.github/workflows/integ-test-restore-java-toolchain.yml @@ -29,7 +29,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build using Gradle wrapper @@ -49,7 +49,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Execute Gradle build with --offline diff --git a/.github/workflows/integ-test-sample-gradle-plugin.yml b/.github/workflows/integ-test-sample-gradle-plugin.yml index ed447ac..3eaa024 100644 --- a/.github/workflows/integ-test-sample-gradle-plugin.yml +++ b/.github/workflows/integ-test-sample-gradle-plugin.yml @@ -29,7 +29,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build gradle-plugin project @@ -48,7 +48,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Build gradle-plugin project diff --git a/.github/workflows/integ-test-sample-kotlin-dsl.yml b/.github/workflows/integ-test-sample-kotlin-dsl.yml index 3e6625e..15826fc 100644 --- a/.github/workflows/integ-test-sample-kotlin-dsl.yml +++ b/.github/workflows/integ-test-sample-kotlin-dsl.yml @@ -29,7 +29,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build kotlin-dsl project @@ -48,7 +48,7 @@ jobs: - name: Download distribution if required uses: ./.github/actions/download-dist - name: Setup Gradle - uses: ./ + uses: ./setup-gradle with: cache-read-only: true - name: Build kotlin-dsl project diff --git a/README.md b/setup-gradle/README.md similarity index 100% rename from README.md rename to setup-gradle/README.md diff --git a/action.yml b/setup-gradle/action.yml similarity index 99% rename from action.yml rename to setup-gradle/action.yml index da2e0f0..4f774ff 100644 --- a/action.yml +++ b/setup-gradle/action.yml @@ -143,8 +143,8 @@ outputs: runs: using: 'node20' - main: 'dist/main/index.js' - post: 'dist/post/index.js' + main: '../dist/main/index.js' + post: '../dist/post/index.js' branding: icon: 'box' diff --git a/.gitignore b/sources/.gitignore similarity index 100% rename from .gitignore rename to sources/.gitignore