Compare commits

..

84 Commits

Author SHA1 Message Date
bigdaz
473878a77f [bot] Update dist directory 2024-11-12 03:55:37 +00:00
daz
f22ac61fd1 Use Gradle 8.11 as the minimum version for cache-cleanup
The cache-cleanup API has changed, so the init-script that worked with
Gradle 8.9 no longer works with 8.11.
We now provision and use Gradle 8.11 for cache cleanup.

This provides a band-aid fix for #417 but that issue will still impact
any build configured to run with Gradle > 8.11
2024-11-11 20:54:29 -07:00
daz
4ec844e551 npm audit fix 2024-11-11 20:54:29 -07:00
bigdaz
24ca383271 [bot] Update dist directory 2024-11-11 19:51:02 +00:00
Daz DeBoer
4ca2d5d749 Dependency updates (#429) 2024-11-11 12:49:55 -07:00
daz
f31476bde2 Update test for real-world data
This test assumed that at least one 'snapshot' wrapper checksum was unique,
and not contained in the set of wrapper checksums for released distributions.
This is no longer the case, so the assumption has been modified.
2024-11-11 12:18:11 -07:00
bigdaz
c345cfbe93 Update known wrapper checksums 2024-11-11 12:18:11 -07:00
dependabot[bot]
b526f6673b Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.18.0 to 2.18.1.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.0...jackson-dataformats-binary-2.18.1)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 12:18:11 -07:00
daz
93415e6645 Update patch for actions/cache 3.3.0 2024-11-11 12:18:11 -07:00
dependabot[bot]
6bc218d5d0 Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [nock](https://github.com/nock/nock).


Updates `@actions/cache` from 3.2.4 to 3.3.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Updates `@types/node` from 20.17.3 to 20.17.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint-plugin-jest` from 28.8.3 to 28.9.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.3...v28.9.0)

Updates `nock` from 13.5.5 to 13.5.6
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.5...v13.5.6)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 11:34:26 -07:00
Daniel Shuy
9d68e8b435 Update build reports path for multi-project build 2024-11-11 11:16:22 -07:00
dependabot[bot]
707359876a Bump @types/node
Bumps the npm-dependencies group with 1 update in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 20.17.2 to 20.17.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:31:04 -06:00
bigdaz
4103f31d4d [bot] Update dist directory 2024-10-31 00:29:22 +00:00
dependabot[bot]
15020cf347 Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact), [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@actions/artifact` from 2.1.10 to 2.1.11
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@types/jest` from 29.5.13 to 29.5.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `@types/node` from 20.16.11 to 20.17.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `typescript` from 5.6.2 to 5.6.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.6.3)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:28:10 -06:00
dependabot[bot]
ed43923279 Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.2 to 5.11.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:28:10 -06:00
bigdaz
6dafcf2d22 [bot] Update dist directory 2024-10-30 23:59:49 +00:00
bigdaz
2ca30c9a83 Update known wrapper checksums 2024-10-30 17:58:46 -06:00
bigdaz
bb0c460cbf [bot] Update dist directory 2024-10-10 08:25:45 +00:00
dependabot[bot]
0674891af5 Bump the npm-dependencies group across 1 directory with 5 updates
Bumps the npm-dependencies group with 5 updates in the /sources directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.1.9` | `2.1.10` |
| [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) | `1.10.1` | `1.11.1` |
| [@octokit/webhooks-types](https://github.com/octokit/webhooks) | `7.5.1` | `7.6.1` |
| [which](https://github.com/npm/node-which) | `4.0.0` | `5.0.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.16.10` | `20.16.11` |



Updates `@actions/artifact` from 2.1.9 to 2.1.10
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@actions/core` from 1.10.1 to 1.11.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Updates `@octokit/webhooks-types` from 7.5.1 to 7.6.1
- [Release notes](https://github.com/octokit/webhooks/releases)
- [Commits](https://github.com/octokit/webhooks/compare/v7.5.1...v7.6.1)

Updates `which` from 4.0.0 to 5.0.0
- [Release notes](https://github.com/npm/node-which/releases)
- [Changelog](https://github.com/npm/node-which/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-which/compare/v4.0.0...v5.0.0)

Updates `@types/node` from 20.16.10 to 20.16.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@octokit/webhooks-types"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-10 02:24:34 -06:00
dependabot[bot]
1b7e89588d Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.1 to 5.11.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.1...r5.11.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-06 20:38:26 -06:00
bigdaz
b0cc090202 [bot] Update dist directory 2024-10-07 02:37:40 +00:00
Daz DeBoer
872d6b954c Dependency updates (#411) 2024-10-06 20:36:28 -06:00
daz
61e4a25782 Control version of Gradle in PATH for unit tests 2024-10-07 12:24:47 +10:00
dependabot[bot]
f4e0ea0cdd Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [typed-rest-client](https://github.com/Microsoft/typed-rest-client), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [@vercel/ncc](https://github.com/vercel/ncc) and [eslint](https://github.com/eslint/eslint).


Updates `typed-rest-client` from 2.0.2 to 2.1.0
- [Release notes](https://github.com/Microsoft/typed-rest-client/releases)
- [Commits](https://github.com/Microsoft/typed-rest-client/compare/v2.0.2...v2.1.0)

Updates `@types/node` from 20.16.5 to 20.16.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@vercel/ncc` from 0.38.1 to 0.38.2
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.1...0.38.2)

Updates `eslint` from 8.57.0 to 8.57.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v8.57.1)

---
updated-dependencies:
- dependency-name: typed-rest-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:36 +10:00
dependabot[bot]
9f70748719 Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
dependabot[bot]
ff4a71656f Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.17.2 to 2.18.0.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.17.2...jackson-dataformats-binary-2.18.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
dependabot[bot]
b5e8e5f396 Bump com.google.guava:guava in /.github/workflow-samples/kotlin-dsl
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
bigdaz
7605d180a5 Update known wrapper checksums 2024-10-07 11:24:35 +10:00
daz
d32c4bdc08 Update wrapper to Gradle 8.10.2 2024-10-07 11:24:35 +10:00
bigdaz
0d30c9111c [bot] Update dist directory 2024-09-14 22:01:51 +00:00
Daz DeBoer
cf8c435260 Correctly handle multiline patterns for extracted entries (#393) 2024-09-14 16:00:48 -06:00
bigdaz
b4c01c399c [bot] Update dist directory 2024-09-13 17:18:30 +00:00
daz
340f8b64e0 Improve cache logging 2024-09-13 11:17:22 -06:00
bigdaz
36455cb5f4 [bot] Update dist directory 2024-09-13 16:46:55 +00:00
Daz DeBoer
e5c1381176 Include cache save/restore times in Job Summary (#389)
Fixes #370
2024-09-13 10:45:46 -06:00
dependabot[bot]
d156388eb1 Bump path-to-regexp from 6.2.1 to 6.3.0 in /sources
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v6.2.1...v6.3.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 20:06:01 -06:00
dependabot[bot]
2e93f415f7 Bump the npm-dependencies group across 1 directory with 2 updates
Bumps the npm-dependencies group with 2 updates in the /sources directory: [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) and [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `@types/jest` from 29.5.12 to 29.5.13
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `eslint-plugin-github` from 5.0.1 to 5.0.2
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 20:06:01 -06:00
bigdaz
ee8dc905e6 [bot] Update dist directory 2024-09-13 01:56:53 +00:00
bot-githubaction
5fe9264c08 Bump references to Develocity Gradle plugin from 3.18 to 3.18.1 2024-09-12 19:55:39 -06:00
dependabot[bot]
29d4d80ef6 Bump the npm-dependencies group across 1 directory with 3 updates
Bumps the npm-dependencies group with 3 updates in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@types/node` from 20.16.1 to 20.16.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint-plugin-jest` from 28.8.0 to 28.8.3
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.0...v28.8.3)

Updates `typescript` from 5.5.4 to 5.6.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 19:55:39 -06:00
dependabot[bot]
478782dbb4 Bump peter-evans/create-pull-request in the github-actions group
Bumps the github-actions group with 1 update: [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


Updates `peter-evans/create-pull-request` from 6 to 7
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 19:55:39 -06:00
bigdaz
e6215edc51 [bot] Update dist directory 2024-09-13 00:44:35 +00:00
Alexis Tual
765a73447c Fix passing expiresInHours query parameter 2024-09-12 18:43:23 -06:00
Daz DeBoer
a122cf5aa7 Document develocity-token-expiry parameter
Fixes #367
2024-09-12 18:32:17 -06:00
bigdaz
5baa1ded34 [bot] Update dist directory 2024-08-31 17:12:28 +00:00
Daz DeBoer
7e0f050645 Ensure minimum Gradle version for cache-cleanup (#364)
Instead of always installing and using the latest Gradle version for
cache cleanup, we now require at least Gradle 8.9.

This avoids downloading and installing Gradle if the version on PATH is
sufficient to perform cache cleanup.
2024-08-31 11:11:24 -06:00
daz
9291ac6ca5 Add example of job summary with cache-read-only 2024-08-29 09:54:55 -06:00
bigdaz
6da85a08fb [bot] Update dist directory 2024-08-27 03:19:58 +00:00
dependabot[bot]
c3c8a18b22 Bump tj-actions/changed-files from 44 to 45 in the github-actions group
Bumps the github-actions group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 44 to 45
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v44...v45)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 21:18:49 -06:00
dependabot[bot]
9498413fd8 Bump the npm-dependencies group in /sources with 3 updates
Bumps the npm-dependencies group in /sources with 3 updates: [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client), [nock](https://github.com/nock/nock) and [ts-jest](https://github.com/kulshekhar/ts-jest).


Updates `@actions/http-client` from 2.2.2 to 2.2.3
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

Updates `nock` from 13.5.4 to 13.5.5
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.4...v13.5.5)

Updates `ts-jest` from 29.2.4 to 29.2.5
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.4...v29.2.5)

---
updated-dependencies:
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 21:18:20 -06:00
Daz DeBoer
16bf8bc8fe Rework docs for Develocity support
Fixes #339
2024-08-26 14:52:14 -06:00
bigdaz
faf4eeacd5 [bot] Update dist directory 2024-08-26 20:49:04 +00:00
Daz DeBoer
4b7cc6e174 Differentiate Gradle 8.1 from 8.10 when checking version (#358)
Fixes #359
2024-08-26 14:47:28 -06:00
daz
0873530e60 Increase Gradle version coverage for init-scripts
As well as testing latest of each major version, also test early release of 6.x and 7.x
2024-08-26 13:57:09 -06:00
bigdaz
f67327f0c8 [bot] Update dist directory 2024-08-26 19:13:13 +00:00
Daz DeBoer
d32a10b3ae Dependency updates (#356)
- Update to DV plugin 3.18
- Update to Gradle 8.10
- Update to address vulnerability in `unzip-stream`
2024-08-26 13:12:08 -06:00
daz
e598a32529 Quote version 8.10 in integ test 2024-08-26 12:47:06 -06:00
dependabot[bot]
d6c8cf816c Bump unzip-stream from 0.3.1 to 0.3.4 in /sources
Bumps [unzip-stream](https://github.com/mhr3/unzip-stream) from 0.3.1 to 0.3.4.
- [Commits](https://github.com/mhr3/unzip-stream/compare/v0.3.1...v0.3.4)

---
updated-dependencies:
- dependency-name: unzip-stream
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:10:02 -06:00
dependabot[bot]
79ea5b8f3e Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.3 to 5.11.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:08:49 -06:00
dependabot[bot]
d77a030aaf Bump com.google.guava:guava in /.github/workflow-samples/kotlin-dsl
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.1-jre to 33.3.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:08:26 -06:00
daz
a8a2fd2323 Update to Gradle 8.10 2024-08-26 11:07:48 -06:00
bot-githubaction
089bfb1063 Bump references to Develocity Gradle plugin from 3.17.6 to 3.18 2024-08-26 10:53:40 -06:00
bigdaz
ca7f3fa2f5 [bot] Update dist directory 2024-08-26 16:48:43 +00:00
dependabot[bot]
1c29763ff7 Bump the npm-dependencies group across 1 directory with 5 updates
Bumps the npm-dependencies group with 5 updates in the /sources directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/glob](https://github.com/actions/toolkit/tree/HEAD/packages/glob) | `0.4.0` | `0.5.0` |
| [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client) | `2.2.1` | `2.2.2` |
| [@octokit/rest](https://github.com/octokit/rest.js) | `21.0.1` | `21.0.2` |
| [cheerio](https://github.com/cheeriojs/cheerio) | `1.0.0-rc.12` | `1.0.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.14.14` | `20.16.1` |



Updates `@actions/glob` from 0.4.0 to 0.5.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/glob/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/glob)

Updates `@actions/http-client` from 2.2.1 to 2.2.2
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

Updates `@octokit/rest` from 21.0.1 to 21.0.2
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v21.0.1...v21.0.2)

Updates `cheerio` from 1.0.0-rc.12 to 1.0.0
- [Release notes](https://github.com/cheeriojs/cheerio/releases)
- [Commits](https://github.com/cheeriojs/cheerio/compare/v1.0.0-rc.12...v1.0.0)

Updates `@types/node` from 20.14.14 to 20.16.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@actions/glob"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@octokit/rest"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: cheerio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 10:47:34 -06:00
bigdaz
1bc1a6c922 Update known wrapper checksums 2024-08-26 10:46:59 -06:00
daz
b51fcf4d6c Only allow 1 integ-test at a time 2024-08-12 10:33:22 -06:00
daz
82758ea0fa Emphasise notice in wrapper-validation docs 2024-08-12 10:03:35 -06:00
bigdaz
835367424c [bot] Update dist directory 2024-08-12 15:59:33 +00:00
bigdaz
1ac097f44e Update known wrapper checksums 2024-08-12 09:58:33 -06:00
dependabot[bot]
60851f5fb2 Bump eslint-plugin-jest in /sources in the npm-dependencies group
Bumps the npm-dependencies group in /sources with 1 update: [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest).


Updates `eslint-plugin-jest` from 28.7.0 to 28.8.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.7.0...v28.8.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 13:46:38 -06:00
bigdaz
e7551dc2a9 [bot] Update dist directory 2024-08-08 19:36:04 +00:00
daz
e482045599 Tweak log message 2024-08-08 13:34:53 -06:00
Marcono1234
631bcacd15 Document that setup-gradle performs wrapper validation 2024-08-07 15:30:54 -06:00
Daz DeBoer
d724da5563 Update RELEASING.md for v4 2024-08-07 11:41:14 -06:00
dependabot[bot]
228ce9b15b Bump @types/unzipper in /sources in the npm-dependencies group
Bumps the npm-dependencies group in /sources with 1 update: [@types/unzipper](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/unzipper).


Updates `@types/unzipper` from 0.10.9 to 0.10.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/unzipper)

---
updated-dependencies:
- dependency-name: "@types/unzipper"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 10:11:26 -06:00
daz
64869b1757 Attempt to reduce contention in integ-test-full 2024-08-07 09:04:49 -06:00
Daz DeBoer
0b404a7148 Reduce Dependabot checks to weekly 2024-08-07 07:58:19 -06:00
dependabot[bot]
4cb1dc0963 Bump the npm-dependencies group across 1 directory with 2 updates
Bumps the npm-dependencies group with 2 updates in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser).


Updates `@types/node` from 20.12.4 to 20.14.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/parser` from 7.11.0 to 7.18.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.18.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 09:16:21 -06:00
bigdaz
1eb9607ae7 [bot] Update dist directory 2024-08-06 14:52:54 +00:00
daz
a5a9e731f3 Bump the npm-dependencies group in /sources with 11 updates
Bumps the npm-dependencies group in /sources with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.1.4` | `2.1.9` |
| [@octokit/rest](https://github.com/octokit/rest.js) | `20.1.0` | `21.0.1` |
| [@octokit/webhooks-types](https://github.com/octokit/webhooks) | `7.5.0` | `7.5.1` |
| [semver](https://github.com/npm/node-semver) | `7.6.0` | `7.6.3` |
| [typed-rest-client](https://github.com/Microsoft/typed-rest-client) | `1.8.11` | `2.0.2` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.5.0` | `7.11.0` |
| [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | `4.10.2` | `5.0.1` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `27.9.0` | `28.7.0` |
| [prettier](https://github.com/prettier/prettier) | `3.2.5` | `3.3.3` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.2` | `29.2.4` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.3` | `5.5.4` |

Updates `@actions/artifact` from 2.1.4 to 2.1.9
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@octokit/rest` from 20.1.0 to 21.0.1
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v20.1.0...v21.0.1)

Updates `@octokit/webhooks-types` from 7.5.0 to 7.5.1
- [Release notes](https://github.com/octokit/webhooks/releases)
- [Commits](https://github.com/octokit/webhooks/compare/v7.5.0...v7.5.1)

Updates `semver` from 7.6.0 to 7.6.3
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.0...v7.6.3)

Updates `typed-rest-client` from 1.8.11 to 2.0.2
- [Release notes](https://github.com/Microsoft/typed-rest-client/releases)
- [Commits](https://github.com/Microsoft/typed-rest-client/compare/v1.8.11...v2.0.2)

Updates `@typescript-eslint/parser` from 7.5.0 to 7.11.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)

Updates `eslint-plugin-github` from 4.10.2 to 5.0.1
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.10.2...v5.0.1)

Updates `eslint-plugin-jest` from 27.9.0 to 28.7.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.9.0...v28.7.0)

Updates `prettier` from 3.2.5 to 3.3.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.3)

Updates `ts-jest` from 29.1.2 to 29.2.4
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.2...v29.2.4)

Updates `typescript` from 5.4.3 to 5.5.4
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.5.4)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@octokit/rest"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@octokit/webhooks-types"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: typed-rest-client
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 08:51:50 -06:00
daz
add58192d1 Improve parameter description for 'cache-cleanup' 2024-08-05 10:54:56 -06:00
Daz DeBoer
9edf610422 Update RELEASING.md for v4 2024-08-04 15:14:38 -06:00
daz
b1833c4c90 Account for invalid wrapper jar 2024-08-03 16:51:41 -06:00
daz
895252588e Update docs for v4 release 2024-08-03 16:39:51 -06:00
82 changed files with 252465 additions and 75868 deletions

View File

@@ -47,40 +47,40 @@ updates:
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"
- package-ecosystem: "gradle" - package-ecosystem: "gradle"
directory: ".github/workflow-samples/groovy-dsl" directory: ".github/workflow-samples/groovy-dsl"
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"
- package-ecosystem: "gradle" - package-ecosystem: "gradle"
directory: ".github/workflow-samples/java-toolchain" directory: ".github/workflow-samples/java-toolchain"
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"
- package-ecosystem: "gradle" - package-ecosystem: "gradle"
directory: ".github/workflow-samples/kotlin-dsl" directory: ".github/workflow-samples/kotlin-dsl"
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"
- package-ecosystem: "gradle" - package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper" directory: ".github/workflow-samples/no-wrapper"
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"
- package-ecosystem: "gradle" - package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper-gradle-5" directory: ".github/workflow-samples/no-wrapper-gradle-5"
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"
- package-ecosystem: "gradle" - package-ecosystem: "gradle"
directory: "sources/test/init-scripts" directory: "sources/test/init-scripts"
registries: registries:
- gradle-plugin-portal - gradle-plugin-portal
schedule: schedule:
interval: "daily" interval: "weekly"

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.6" id "com.gradle.develocity" version "3.18.1"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1" id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
} }

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -8,9 +8,9 @@ repositories {
dependencies { dependencies {
api("org.apache.commons:commons-math3:3.6.1") api("org.apache.commons:commons-math3:3.6.1")
implementation("com.google.guava:guava:33.2.1-jre") implementation("com.google.guava:guava:33.3.1-jre")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.3") testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
} }
tasks.test { tasks.test {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id("com.gradle.develocity") version "3.17.6" id("com.gradle.develocity") version "3.18.1"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.1" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.1"
} }

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.6" id "com.gradle.develocity" version "3.18.1"
} }
develocity { develocity {

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.6" id "com.gradle.develocity" version "3.18.1"
} }
develocity { develocity {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.6" id "com.gradle.develocity" version "3.18.1"
} }
develocity { develocity {

View File

@@ -23,6 +23,12 @@ jobs:
node-version: 20 node-version: 20
cache: npm cache: npm
cache-dependency-path: sources/package-lock.json cache-dependency-path: sources/package-lock.json
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
with:
gradle-version: "8.11"
- name: Check formatting and compile - name: Check formatting and compile
run: | run: |

View File

@@ -21,7 +21,7 @@ jobs:
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files
uses: tj-actions/changed-files@v44 uses: tj-actions/changed-files@v45
with: with:
files: | files: |
dist/** dist/**

View File

@@ -26,7 +26,9 @@ jobs:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 # Use a released version to avoid breakages uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
- name: Run integration tests - name: Run integration tests
working-directory: sources/test/init-scripts working-directory: sources/test/init-scripts
run: ./gradlew check run: ./gradlew check

View File

@@ -10,7 +10,7 @@ permissions:
contents: write contents: write
concurrency: concurrency:
group: integ-test-${{ github.ref }} group: integ-test
cancel-in-progress: false cancel-in-progress: false
jobs: jobs:

View File

@@ -15,7 +15,7 @@ permissions:
contents: write contents: write
concurrency: concurrency:
group: integ-test-${{ github.ref }} group: integ-test
cancel-in-progress: false cancel-in-progress: false
jobs: jobs:

View File

@@ -94,3 +94,20 @@ jobs:
- name: Run build - name: Run build
working-directory: .github/workflow-samples/groovy-dsl working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew assemble run: ./gradlew assemble
cache-read-only:
needs: build-distribution
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- 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

View File

@@ -21,6 +21,7 @@ env:
jobs: jobs:
cache-cleanup-full-build: cache-cleanup-full-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -43,6 +44,7 @@ jobs:
cache-cleanup-assemble-build: cache-cleanup-assemble-build:
needs: cache-cleanup-full-build needs: cache-cleanup-full-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -65,6 +67,7 @@ jobs:
cache-cleanup-check-clean-cache: cache-cleanup-check-clean-cache:
needs: cache-cleanup-assemble-build needs: cache-cleanup-assemble-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -20,6 +20,7 @@ env:
jobs: jobs:
caching-config-seed-build: caching-config-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -50,6 +51,7 @@ jobs:
caching-config-verify-build: caching-config-verify-build:
needs: caching-config-seed-build needs: caching-config-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -78,6 +80,7 @@ jobs:
# Test that build scans are captured when caching is explicitly disabled # Test that build scans are captured when caching is explicitly disabled
caching-config-cache-disabled: caching-config-cache-disabled:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -132,6 +135,7 @@ jobs:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -155,6 +159,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
needs: caching-config-seed-write-only needs: caching-config-seed-write-only
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -23,11 +23,7 @@ env:
jobs: jobs:
dependency-graph-groovy-upload: dependency-graph-groovy-upload:
strategy: runs-on: "ubuntu-latest"
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -59,11 +55,7 @@ jobs:
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
dependency-graph-kotlin-generate-and-submit: dependency-graph-kotlin-generate-and-submit:
strategy: runs-on: "ubuntu-latest"
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -79,11 +71,7 @@ jobs:
working-directory: .github/workflow-samples/kotlin-dsl working-directory: .github/workflow-samples/kotlin-dsl
dependency-graph-multiple-builds: dependency-graph-multiple-builds:
strategy: runs-on: "ubuntu-latest"
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -24,6 +24,7 @@ env:
jobs: jobs:
dependency-submission-groovy-generate-and-upload: dependency-submission-groovy-generate-and-upload:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -46,6 +47,7 @@ jobs:
dependency-submission-groovy-restore-cache: dependency-submission-groovy-restore-cache:
needs: [dependency-submission-groovy-generate-and-upload] needs: [dependency-submission-groovy-generate-and-upload]
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -67,6 +69,7 @@ jobs:
dependency-submission-groovy-download-and-submit: dependency-submission-groovy-download-and-submit:
needs: [dependency-submission-groovy-generate-and-upload] needs: [dependency-submission-groovy-generate-and-upload]
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -86,6 +89,7 @@ jobs:
dependency-submission-kotlin-generate-and-submit: dependency-submission-kotlin-generate-and-submit:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -103,6 +107,7 @@ jobs:
dependency-submission-multiple-builds: dependency-submission-multiple-builds:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -148,6 +153,7 @@ jobs:
dependency-submission-multiple-builds-upload: dependency-submission-multiple-builds-upload:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -299,6 +305,7 @@ jobs:
dependency-submission-custom-report-dir-submit: dependency-submission-custom-report-dir-submit:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -33,11 +33,11 @@ jobs:
matrix: matrix:
gradle: [current, 7.6.2, 6.9.4, 5.6.4] gradle: [current, 7.6.2, 6.9.4, 5.6.4]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [3.16.2, 3.17.6] plugin-version: [3.16.2, 3.18.1]
include: include:
- plugin-version: 3.16.2 - plugin-version: 3.16.2
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
- plugin-version: 3.17.6 - plugin-version: 3.18.1
accessKeyEnv: DEVELOCITY_ACCESS_KEY accessKeyEnv: DEVELOCITY_ACCESS_KEY
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@@ -84,7 +84,7 @@ jobs:
matrix: matrix:
gradle: [current, 7.6.2, 6.9.4, 5.6.4] gradle: [current, 7.6.2, 6.9.4, 5.6.4]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [3.16.2, 3.17.6] plugin-version: [3.16.2, 3.18.1]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@@ -133,7 +133,7 @@ jobs:
matrix: matrix:
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ] gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [ 3.16.2, 3.17.6 ] plugin-version: [ 3.16.2, 3.18.1 ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
@@ -169,7 +169,7 @@ jobs:
matrix: matrix:
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ] gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [ 3.16.2, 3.17.6 ] plugin-version: [ 3.16.2, 3.18.1 ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View File

@@ -23,6 +23,7 @@ jobs:
# Each build verifies that it is executed with the expected Gradle version. # Each build verifies that it is executed with the expected Gradle version.
provision-gradle: provision-gradle:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -74,7 +75,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
gradle: [8.9, 8.8, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1] # 8.8 is the latest installed on windows runners gradle: ["8.10", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1]
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
include: include:
- java-version: 11 - java-version: 11

View File

@@ -25,6 +25,7 @@ jobs:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -57,6 +58,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1 GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
needs: restore-cc-seed-build-groovy needs: restore-cc-seed-build-groovy
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -98,6 +100,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2 GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
needs: restore-cc-verify-build-groovy needs: restore-cc-verify-build-groovy
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -138,6 +141,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_x GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_x
needs: restore-cc-seed-build-groovy needs: restore-cc-seed-build-groovy
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -169,6 +173,7 @@ jobs:
env: env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -201,6 +206,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1 GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
needs: restore-cc-seed-build-kotlin needs: restore-cc-seed-build-kotlin
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -233,6 +239,7 @@ jobs:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2 GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
needs: restore-cc-modify-build-kotlin needs: restore-cc-modify-build-kotlin
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -21,6 +21,7 @@ env:
jobs: jobs:
restore-gradle-home-seed-build: restore-gradle-home-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -43,6 +44,7 @@ jobs:
restore-gradle-home-dependencies-cache: restore-gradle-home-dependencies-cache:
needs: restore-gradle-home-seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -65,6 +67,7 @@ jobs:
restore-gradle-home-build-cache: restore-gradle-home-build-cache:
needs: restore-gradle-home-seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -87,6 +90,7 @@ jobs:
restore-gradle-home-no-extracted-cache-entries-restored: restore-gradle-home-no-extracted-cache-entries-restored:
needs: restore-gradle-home-seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -111,6 +115,7 @@ jobs:
restore-gradle-home-pre-existing-gradle-home: restore-gradle-home-pre-existing-gradle-home:
needs: restore-gradle-home-seed-build needs: restore-gradle-home-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -20,6 +20,7 @@ env:
jobs: jobs:
restore-java-toolchain-seed-build: restore-java-toolchain-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -42,6 +43,7 @@ jobs:
restore-java-toolchain-verify-build: restore-java-toolchain-verify-build:
needs: restore-java-toolchain-seed-build needs: restore-java-toolchain-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -20,6 +20,7 @@ env:
jobs: jobs:
sample-gradle-plugin-seed-build: sample-gradle-plugin-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -41,6 +42,7 @@ jobs:
sample-gradle-plugin-verify-build: sample-gradle-plugin-verify-build:
needs: sample-gradle-plugin-seed-build needs: sample-gradle-plugin-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -20,6 +20,7 @@ env:
jobs: jobs:
sample-kotlin-dsl-seed-build: sample-kotlin-dsl-seed-build:
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}
@@ -41,6 +42,7 @@ jobs:
sample-kotlin-dsl-verify-build: sample-kotlin-dsl-verify-build:
needs: sample-kotlin-dsl-seed-build needs: sample-kotlin-dsl-seed-build
strategy: strategy:
max-parallel: 1
fail-fast: false fail-fast: false
matrix: matrix:
os: ${{fromJSON(inputs.runner-os)}} os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -37,7 +37,7 @@ jobs:
# If there are no changes, this action will not create a pull request # If there are no changes, this action will not create a pull request
- name: Create or update pull request - name: Create or update pull request
uses: peter-evans/create-pull-request@v6 uses: peter-evans/create-pull-request@v7
with: with:
branch: bot/wrapper-checksums-update branch: bot/wrapper-checksums-update
commit-message: Update known wrapper checksums commit-message: Update known wrapper checksums

View File

@@ -30,7 +30,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew build run: ./gradlew build
``` ```
@@ -68,7 +68,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
``` ```
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios. See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
@@ -79,6 +79,9 @@ The `wrapper-validation` action validates the checksums of _all_ [Gradle Wrapper
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`. The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
Starting with v4 the `setup-gradle` action will [perform wrapper validation](docs/setup-gradle.md#gradle-wrapper-validation) on each execution.
If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
### Example workflow ### Example workflow
```yaml ```yaml
@@ -94,7 +97,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3 - uses: gradle/actions/wrapper-validation@v4
``` ```
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios. See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.

View File

@@ -5,58 +5,27 @@
- Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch. - Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch.
- This should include any workflows triggered by `[bot] Update dist directory` - This should include any workflows triggered by `[bot] Update dist directory`
- Decide on the version number to use for the release. The action releases should follow semantic versioning. - Decide on the version number to use for the release. The action releases should follow semantic versioning.
- By default, a patch release is assumed (eg. `3.0.0``3.0.1`) - By default, a patch release is assumed (eg. `4.0.0``4.0.1`)
- If new features have been added, bump the minor version (eg `3.1.1``3.2.0`) - If new features have been added, bump the minor version (eg `4.1.1``4.2.0`)
- If a new major release is required, bump the major version (eg `3.1.1``4.0.0`) - If a new major release is required, bump the major version (eg `4.1.1``5.0.0`)
- Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0. - Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
## Release gradle/actions ## Release gradle/actions
- Create a tag for the release. The tag should have the format `v3.1.0` - Create a tag for the release. The tag should have the format `v4.1.0`
- From CLI: `git tag v3.1.0 && git push --tags` - From CLI: `git tag v4.1.0 && git push --tags`
- Go to https://github.com/gradle/actions/releases and "Draft new release" - Go to https://github.com/gradle/actions/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title. - Use the newly created tag and copy the tag name exactly as the release title.
- Craft release notes content based on issues closed, PRs merged and commits - Craft release notes content based on issues closed, PRs merged and commits
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0 - Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
- Publish the release. - Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag. - Force push the `v4` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags` - From CLI: `git tag -f -a -m "v4.0.0" v4 v4.0.0 && git push -f --tags`
- Note that we set the commit message for the tag to the newly released version. - Note that we set the commit message for the tag to the newly released version.
## Release gradle/gradle-build-action
During the 3.x release series, we will continue to publish parallel releases of `gradle/gradle-build-action`. These releases will simply delegate to `gradle/actions/setup-gradle` with the same version.
- Update the [gradle-build-action action.yml](https://github.com/gradle/gradle-build-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/setup-gradle`.
- Ensure that any parameters that have been added to the setup-gradle action are added to the gradle-build-action definition, and that these are passed on to setup-gradle.
- Create and push a tag for the release.
- From CLI: `git tag v3.1.0 && git push --tags`
- Go to https://github.com/gradle/gradle-build-action/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title.
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/setup-gradle`.
- Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
## Release gradle/wrapper-validation-action
During the 3.x release series, we will continue to publish parallel releases of `gradle/wrapper-validation-action`. These releases will simply delegate to `gradle/actions/wrapper-validation` with the same version.
- Update the [wrapper-validation-action action.yml](https://github.com/gradle/wrapper-validation-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/wrapper-validation`.
- Ensure that any parameters that have been added to the `wrapper-validation` action (if any) are added to the action definition, and that these are passed on to setup-gradle.
- Create and push a tag for the release.
- From CLI: `git tag v3.1.0 && git push --tags`
- Go to https://github.com/gradle/wrapper-validation-action/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title.
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/wrapper-validation`.
- Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
## Post release steps ## Post release steps
Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release: Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release:
https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v2.1.4 update PR](https://github.com/actions/starter-workflows/pull/1489) for an example. https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v4.0.0 update PR](https://github.com/actions/starter-workflows/pull/2468) for an example.
Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release: Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release:
https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v2.1.4 update PR](https://github.com/github/docs/pull/16392) for an example. https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v4.0.0 update PR](https://github.com/github/docs/pull/34239) for an example.

View File

@@ -29,7 +29,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
``` ```
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios. See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.

View File

@@ -60,7 +60,8 @@ inputs:
cache-cleanup: cache-cleanup:
description: | description: |
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache. Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
By default, no cleanup is performed. It can be configured to run every time, or only when all Gradle builds succeed for the Job. By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
Valid values are 'never', 'on-success' and 'always'. Valid values are 'never', 'on-success' and 'always'.
required: false required: false
default: 'on-success' default: 'on-success'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -43,7 +43,7 @@ jobs:
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
``` ```
### Gradle execution ### Gradle execution
@@ -68,7 +68,7 @@ Three input parameters are required, one to enable publishing and two more to ac
```yaml ```yaml
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
build-scan-publish: true build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use" build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
@@ -83,7 +83,7 @@ In some cases, the default action configuration will not be sufficient, and addi
```yaml ```yaml
- name: Generate and save dependency graph - name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
# Use a particular Gradle version instead of the configured wrapper. # Use a particular Gradle version instead of the configured wrapper.
gradle-version: 8.6 gradle-version: 8.6
@@ -273,7 +273,7 @@ For example, if you want to exclude dependencies resolved by the `buildSrc` proj
```yaml ```yaml
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
# Exclude all dependencies that originate solely in the 'buildSrc' project # Exclude all dependencies that originate solely in the 'buildSrc' project
dependency-graph-exclude-projets: ':buildSrc' dependency-graph-exclude-projets: ':buildSrc'
@@ -317,10 +317,10 @@ jobs:
java-version: 17 java-version: 17
- name: Generate and submit dependency graph - name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
- name: Perform dependency review - name: Perform dependency review
uses: actions/dependency-review-action@v3 uses: actions/dependency-review-action@v4
``` ```
## Usage with pull requests from public forked repositories ## Usage with pull requests from public forked repositories
@@ -353,7 +353,7 @@ jobs:
java-version: 17 java-version: 17
- name: Generate and save dependency graph - name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
dependency-graph: generate-and-upload dependency-graph: generate-and-upload
``` ```
@@ -376,7 +376,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download and submit dependency graph - name: Download and submit dependency graph
uses: gradle/actions/dependency-submission@v3 uses: gradle/actions/dependency-submission@v4
with: with:
dependency-graph: download-and-submit # Download saved dependency-graph and submit dependency-graph: download-and-submit # Download saved dependency-graph and submit
``` ```
@@ -403,7 +403,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 'Dependency Review' - name: 'Dependency Review'
uses: actions/dependency-review-action@v3 uses: actions/dependency-review-action@v4
with: with:
retry-on-snapshot-warnings: true retry-on-snapshot-warnings: true
retry-on-snapshot-warnings-timeout: 600 retry-on-snapshot-warnings-timeout: 600

View File

@@ -20,7 +20,7 @@ To convert your workflows, simply replace:
``` ```
with with
``` ```
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
``` ```
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation` ## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
@@ -40,7 +40,7 @@ To convert your workflows, simply replace:
``` ```
with with
``` ```
uses: gradle/actions/wrapper-validation@v3 uses: gradle/actions/wrapper-validation@v4
``` ```
## Using the action to execute Gradle via the `arguments` parameter is deprecated ## Using the action to execute Gradle via the `arguments` parameter is deprecated
@@ -82,7 +82,7 @@ The exact syntax depends on whether or not your project is configured with the [
``` ```
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Assemble the project - name: Assemble the project
run: ./gradlew assemble run: ./gradlew assemble
@@ -99,9 +99,9 @@ The exact syntax depends on whether or not your project is configured with the [
``` ```
- name: Setup Gradle for a non-wrapper project - name: Setup Gradle for a non-wrapper project
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
gradle-version: 8.9 gradle-version: "8.10"
- name: Assemble the project - name: Assemble the project
run: gradle assemble run: gradle assemble

View File

@@ -45,7 +45,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build - name: Execute Gradle build
run: ./gradlew build run: ./gradlew build
@@ -57,11 +57,11 @@ The `setup-gradle` action can download and install a specified Gradle version, a
Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid having to download them again later. Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid having to download them again later.
```yaml ```yaml
- name: Setup Gradle 8.5 - name: Setup Gradle 8.10
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
gradle-version: 8.5 gradle-version: "8.10" # Quotes required to prevent YAML converting to number
- name: Build with Gradle 8.5 - name: Build with Gradle 8.10
run: gradle build run: gradle build
``` ```
@@ -96,7 +96,7 @@ jobs:
distribution: temurin distribution: temurin
java-version: 17 java-version: 17
- uses: gradle/actions/setup-gradle@v3 - uses: gradle/actions/setup-gradle@v4
id: setup-gradle id: setup-gradle
with: with:
gradle-version: release-candidate gradle-version: release-candidate
@@ -213,7 +213,7 @@ jobs:
distribution: temurin distribution: temurin
java-version: 17 java-version: 17
- uses: gradle/actions/setup-gradle@v3 - uses: gradle/actions/setup-gradle@v4
with: with:
gradle-version: 8.6 gradle-version: 8.6
cache-encryption-key: ${{ secrets.GradleEncryptionKey }} cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
@@ -455,7 +455,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure' add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure'
@@ -492,17 +492,17 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Run build with Gradle wrapper - name: Run build with Gradle wrapper
run: ./gradlew build --scan run: ./gradlew build --scan
- name: Upload build reports - name: Upload build reports
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
name: build-reports name: build-reports
path: build/reports/ path: **/build/reports/
``` ```
### Use of custom init-scripts in Gradle User Home ### Use of custom init-scripts in Gradle User Home
@@ -523,7 +523,7 @@ If you do not want wrapper-validation to occur automatically, you can disable it
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
validate-wrappers: false validate-wrappers: false
``` ```
@@ -535,7 +535,7 @@ These are not allowed by default.
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
validate-wrappers: true validate-wrappers: true
allow-snapshot-wrappers: true allow-snapshot-wrappers: true
@@ -600,7 +600,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle to generate and submit dependency graphs - name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job) - name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
@@ -627,7 +627,7 @@ graph cannot be generated or submitted. You can enable this behavior with the `d
```yaml ```yaml
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted # Ensure that the workflow Job will fail if the dependency graph cannot be submitted
- uses: gradle/actions/setup-gradle@v3 - uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
dependency-graph-continue-on-failure: false dependency-graph-continue-on-failure: false
@@ -652,7 +652,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle to generate and submit dependency graphs - name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy - name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
@@ -682,7 +682,7 @@ jobs:
java-version: 17 java-version: 17
- name: Setup Gradle to generate and submit dependency graphs - name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate-and-submit dependency-graph: generate-and-submit
- name: Build the app, generating a graph of dependencies required - name: Build the app, generating a graph of dependencies required
@@ -718,20 +718,112 @@ To reduce storage costs for these artifacts, you can set the `artifact-retention
```yaml ```yaml
- name: Generate dependency graph, but only retain artifact for one day - name: Generate dependency graph, but only retain artifact for one day
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
dependency-graph: generate dependency-graph: generate
artifact-retention-days: 1 artifact-retention-days: 1
``` ```
# Develocity plugin injection # Develocity Build Scan® integration
The `setup-gradle` action provides support for injecting and configuring the Develocity Gradle plugin into any Gradle build, without any modification to the project sources. Publishing a Develocity Build Scan can be very helpful for Gradle builds run on GitHub Actions. Each Build Scan provides a
This is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables. detailed report of the execution of the build, including which tasks were executed and the results of any test execution.
The `setup-gradle` plugin provides a number of features to enable and enhance publishing Build Scans® to a Develocity instance.
## Publishing to scans.gradle.com
If you don't have a a private Develocity instance, you can easily publish Build Scans to the
free, public Develocity instance (https://scans.gradle.com).
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use).
```yaml
- name: Setup Gradle to publish build scans
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Run a Gradle build - a build scan will be published automatically
run: ./gradlew build
```
## Managing Develocity access keys
Develocity access keys are long-lived, creating risks if they are leaked. To mitigate this risk this,
the `setup-gradle` action can automatically attempt to obtain a [short-lived access token](https://docs.gradle.com/develocity/gradle-plugin/current/#short_lived_access_tokens)
to use when authenticating with Develocity.
The short-lived access token will then be used wherever a Develocity access key is required.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
# Subsequent steps will automatically use a short-lived access token to authenticate with Develocity
- name: Run a Gradle build that is configured to publish to Develocity.
run: ./gradlew build
```
### Increasing the expiry time for Develocity access tokens
By default, a short-lived Develocity access token will be valid for 2 hours from the time it is generated. If your workflows take longer than
2 hours to complete, you may see failure to publish Build Scans due to access token expiry.
To avoid this, use the `develocity-token-expiry` parameter to specify a different token expiry in hours.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
develocity-token-expiry: 8 # The number of hours that the access token should remain valid (max 24).
```
### Develocity access key supplied as environment variable
The preferred mechanism is to supply the long-lived Develocity access key directly to `setup-gradle` via
the `develocity-access-key` input variable. However, the action will also detect an access key configured as an environment variable,
such as `DEVELOCITY_ACCESS_KEY` or `GRADLE_ENTERPRISE_ACCESS_KEY`. In this case, the environment variable value will be replaced by
a short-lived access token, thus hiding the long-lived access key from subsequent steps.
```yaml
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
jobs:
build-with-gradle:
runs-on: ubuntu-latest
steps:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
# The build will automatically use a short-lived access token to authenticate with Develocity
- name: Run a Gradle build that is configured to publish to Develocity.
run: ./gradlew build
```
### Failure to obtain a short-lived access token
If a short-lived token cannot be retrieved (for example, if the Develocity server version is lower than `2024.1`):
- If the access key is provided via `develocity-access-key`, then no access token is set and authentication with Develocity will not succeed.
- If the access key is provided via an environment variable, a warning will be logged and the environment variable will be left as-is.
This can result in long-lived access keys being unintentionally exposed to other workflow steps.
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
## Develocity plugin injection
The `setup-gradle` action provides support for transparently injecting and configuring the Develocity Gradle plugin into any Gradle build,
without any modification to the project sources. This allows Build Scans to be published for a repository without any changes to the project sources.
Develocity injection is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables.
The same auto-injection behavior is available for the Common Custom User Data Gradle plugin, which enriches any build scans published with additional useful information. The same auto-injection behavior is available for the Common Custom User Data Gradle plugin, which enriches any build scans published with additional useful information.
## Enabling Develocity injection ### Enabling Develocity injection
To enable Develocity injection for your build, you must provide the required configuration via inputs. To enable Develocity injection for your build, you must provide the required configuration via inputs.
@@ -739,7 +831,7 @@ Here's a minimal example:
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
develocity-injection-enabled: true develocity-injection-enabled: true
develocity-url: https://develocity.your-server.com develocity-url: https://develocity.your-server.com
@@ -749,14 +841,14 @@ Here's a minimal example:
run: ./gradlew build run: ./gradlew build
``` ```
This configuration will automatically apply `v3.17.6` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com. This configuration will automatically apply `v3.18.1` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans. This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret: In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
with: with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
@@ -770,14 +862,7 @@ In the likely scenario that your Develocity server requires authentication, you
This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable. This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable.
### Short-lived access tokens ### Configuring Develocity injection
Develocity access keys are long-lived, creating risks if they are leaked. To avoid this, users can use short-lived access tokens to authenticate with Develocity. Access tokens can be used wherever an access key would be used. Access tokens are only valid for the Develocity instance that created them.
If a short-lived token fails to be retrieved (for example, if the Develocity server version is lower than `2024.1`):
- if a `GRADLE_ENTERPRISE_ACCESS_KEY` env var has been set, we're falling back to it with a deprecation warning
- otherwise no access key env var will be set. In that case Develocity authenticated operations like build cache read/write and build scan publication will fail without failing the build.
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
## Configuring Develocity injection
The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below: The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below:
@@ -814,33 +899,16 @@ Here's an example using the env vars:
```yaml ```yaml
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Run a Gradle build with Develocity injection enabled with environment variables - name: Run a Gradle build with Develocity injection enabled with environment variables
run: ./gradlew build run: ./gradlew build
env: env:
DEVELOCITY_INJECTION_ENABLED: true DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_URL: https://develocity.your-server.com DEVELOCITY_URL: https://develocity.your-server.com
DEVELOCITY_PLUGIN_VERSION: 3.17.6 DEVELOCITY_ENFORCE_URL: true
``` DEVELOCITY_PLUGIN_VERSION: "3.18.1"
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.0.2"
## Publishing to scans.gradle.com
Develocity injection is designed to enable the publishing of build scans to a Develocity instance,
but is also useful for publishing to the public Build Scans instance (https://scans.gradle.com).
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use).
```yaml
- name: Setup Gradle to publish build scans
uses: gradle/actions/setup-gradle@v3
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"
- name: Run a Gradle build - a build scan will be published automatically
run: ./gradlew build
``` ```
# Dependency verification # Dependency verification

View File

@@ -4,8 +4,11 @@ This action validates the checksums of _all_ [Gradle Wrapper](https://docs.gradl
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`. The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
The `setup-gradle` action will perform wrapper validation on each execution. If you are using `setup-gradle` in your > [!NOTE]
workflows, it is unlikely that you will need to use this action. > Starting with v4 the `setup-gradle` action will automatically [perform wrapper validation](../docs/setup-gradle.md#gradle-wrapper-validation)
> on each execution.
>
> If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
## The Gradle Wrapper Problem in Open Source ## The Gradle Wrapper Problem in Open Source
@@ -47,7 +50,7 @@ We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build: Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
```yaml ```yaml
uses: gradle/actions/wrapper-validation@v3 uses: gradle/actions/wrapper-validation@v4
``` ```
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`. This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
@@ -70,7 +73,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3 - uses: gradle/actions/wrapper-validation@v4
``` ```
## Contributing to an external GitHub Repository ## Contributing to an external GitHub Repository

View File

@@ -26,7 +26,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 17
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew build run: ./gradlew build
``` ```

View File

@@ -43,7 +43,8 @@ inputs:
cache-cleanup: cache-cleanup:
description: | description: |
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache. Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
By default, no cleanup is performed. It can be configured to run every time, or only when all Gradle builds succeed for the Job. By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
Valid values are 'never', 'on-success' and 'always'. Valid values are 'never', 'on-success' and 'always'.
required: false required: false
default: 'on-success' default: 'on-success'

View File

@@ -1,3 +1,3 @@
# Configuration file for asdf version manager # Configuration file for asdf version manager
nodejs 20.10.0 nodejs 20.10.0
gradle 8.9 gradle 8.11

2798
sources/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -32,41 +32,40 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/artifact": "2.1.4", "@actions/artifact": "2.1.11",
"@actions/cache": "3.2.4", "@actions/cache": "3.3.0",
"@actions/core": "1.10.1", "@actions/core": "1.11.1",
"@actions/exec": "1.1.1", "@actions/exec": "1.1.1",
"@actions/github": "6.0.0", "@actions/github": "6.0.0",
"@actions/glob": "0.4.0", "@actions/glob": "0.5.0",
"@actions/http-client": "2.2.1", "@actions/http-client": "2.2.3",
"@actions/tool-cache": "2.0.1", "@actions/tool-cache": "2.0.1",
"@octokit/rest": "20.1.0", "@octokit/rest": "21.0.2",
"@octokit/webhooks-types": "7.5.0", "@octokit/webhooks-types": "7.6.1",
"cheerio": "^1.0.0-rc.12", "cheerio": "^1.0.0",
"semver": "7.6.0", "semver": "7.6.3",
"string-argv": "0.3.2", "string-argv": "0.3.2",
"typed-rest-client": "1.8.11", "typed-rest-client": "2.1.0",
"unhomoglyph": "1.0.6", "unhomoglyph": "1.0.6",
"which": "4.0.0" "which": "5.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "29.5.12", "@types/jest": "29.5.14",
"@types/node": "20.12.4", "@types/node": "20.17.6",
"@types/unzipper": "0.10.9", "@types/unzipper": "0.10.10",
"@types/which": "3.0.4", "@types/which": "3.0.4",
"@typescript-eslint/parser": "7.5.0", "@typescript-eslint/parser": "7.18.0",
"@vercel/ncc": "0.38.1", "@vercel/ncc": "0.38.2",
"eslint": "8.57.0", "eslint": "8.57.1",
"eslint-plugin-github": "4.10.2", "eslint-plugin-github": "5.0.2",
"eslint-plugin-jest": "27.9.0", "eslint-plugin-jest": "28.9.0",
"eslint-plugin-prettier": "5.1.3",
"jest": "29.7.0", "jest": "29.7.0",
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
"nock": "13.5.4", "nock": "13.5.6",
"npm-run-all": "4.1.5", "npm-run-all": "4.1.5",
"patch-package": "8.0.0", "patch-package": "8.0.0",
"prettier": "3.2.5", "prettier": "3.3.3",
"ts-jest": "29.1.2", "ts-jest": "29.2.5",
"typescript": "5.4.3" "typescript": "5.6.3"
} }
} }

View File

@@ -44,22 +44,24 @@ export class CacheCleaner {
settings.caches { settings.caches {
cleanup = Cleanup.ALWAYS cleanup = Cleanup.ALWAYS
releasedWrappers.removeUnusedEntriesOlderThan.set(cleanupTime) releasedWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
snapshotWrappers.removeUnusedEntriesOlderThan.set(cleanupTime) snapshotWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
downloadedResources.removeUnusedEntriesOlderThan.set(cleanupTime) downloadedResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
createdResources.removeUnusedEntriesOlderThan.set(cleanupTime) createdResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
buildCache.removeUnusedEntriesOlderThan.set(cleanupTime) buildCache.setRemoveUnusedEntriesOlderThan(cleanupTime)
} }
} }
` `
) )
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}') fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
const executable = await provisioner.provisionGradle('current') // Gradle >= 8.11 required for cache cleanup
// TODO: This is ineffective: we should be using the newest version of Gradle that ran a build, or a newer version if it's available on PATH.
const executable = await provisioner.provisionGradleAtLeast('8.11')
await core.group('Executing Gradle to clean up caches', async () => { await core.group('Executing Gradle to clean up caches', async () => {
core.info(`Cleaning up caches last used before ${cleanTimestamp}`) core.info(`Cleaning up caches last used before ${cleanTimestamp}`)
await this.executeCleanupBuild(executable!, cleanupProjectDir) await this.executeCleanupBuild(executable, cleanupProjectDir)
}) })
} }
@@ -77,11 +79,8 @@ export class CacheCleaner {
'noop' 'noop'
] ]
const result = await exec.getExecOutput(executable, args, { await exec.exec(executable, args, {
cwd: cleanupProjectDir, cwd: cleanupProjectDir
silent: true
}) })
core.info(result.stdout)
} }
} }

View File

@@ -110,10 +110,12 @@ export class CacheEntryListener {
requestedRestoreKeys: string[] | undefined requestedRestoreKeys: string[] | undefined
restoredKey: string | undefined restoredKey: string | undefined
restoredSize: number | undefined restoredSize: number | undefined
restoredTime: number | undefined
notRestored: string | undefined notRestored: string | undefined
savedKey: string | undefined savedKey: string | undefined
savedSize: number | undefined savedSize: number | undefined
savedTime: number | undefined
notSaved: string | undefined notSaved: string | undefined
constructor(entryName: string) { constructor(entryName: string) {
@@ -130,9 +132,10 @@ export class CacheEntryListener {
return this return this
} }
markRestored(key: string, size: number | undefined): CacheEntryListener { markRestored(key: string, size: number | undefined, time: number): CacheEntryListener {
this.restoredKey = key this.restoredKey = key
this.restoredSize = size this.restoredSize = size
this.restoredTime = time
return this return this
} }
@@ -141,9 +144,10 @@ export class CacheEntryListener {
return this return this
} }
markSaved(key: string, size: number | undefined): CacheEntryListener { markSaved(key: string, size: number | undefined, time: number): CacheEntryListener {
this.savedKey = key this.savedKey = key
this.savedSize = size this.savedSize = size
this.savedTime = time
return this return this
} }
@@ -182,14 +186,16 @@ ${renderEntryTable(entries)}
function renderEntryTable(entries: CacheEntryListener[]): string { function renderEntryTable(entries: CacheEntryListener[]): string {
return ` return `
<table> <table>
<tr><td></td><th>Count</th><th>Total Size (Mb)</th></tr> <tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</tr>
<tr><td>Entries Restored</td> <tr><td>Entries Restored</td>
<td>${getCount(entries, e => e.restoredSize)}</td> <td>${getCount(entries, e => e.restoredSize)}</td>
<td>${getSize(entries, e => e.restoredSize)}</td> <td>${getSize(entries, e => e.restoredSize)}</td>
<td>${getTime(entries, e => e.restoredTime)}</td>
</tr> </tr>
<tr><td>Entries Saved</td> <tr><td>Entries Saved</td>
<td>${getCount(entries, e => e.savedSize)}</td> <td>${getCount(entries, e => e.savedSize)}</td>
<td>${getSize(entries, e => e.savedSize)}</td> <td>${getSize(entries, e => e.savedSize)}</td>
<td>${getTime(entries, e => e.savedTime)}</td>
</tr> </tr>
</table> </table>
` `
@@ -202,9 +208,11 @@ function renderEntryDetails(listener: CacheListener): string {
Requested Key : ${entry.requestedKey ?? ''} Requested Key : ${entry.requestedKey ?? ''}
Restored Key : ${entry.restoredKey ?? ''} Restored Key : ${entry.restoredKey ?? ''}
Size: ${formatSize(entry.restoredSize)} Size: ${formatSize(entry.restoredSize)}
Time: ${formatTime(entry.restoredTime)}
${getRestoredMessage(entry, listener.cacheWriteOnly)} ${getRestoredMessage(entry, listener.cacheWriteOnly)}
Saved Key : ${entry.savedKey ?? ''} Saved Key : ${entry.savedKey ?? ''}
Size: ${formatSize(entry.savedSize)} Size: ${formatSize(entry.savedSize)}
Time: ${formatTime(entry.savedTime)}
${getSavedMessage(entry, listener.cacheReadOnly)} ${getSavedMessage(entry, listener.cacheReadOnly)}
` `
) )
@@ -264,9 +272,23 @@ function getSize(
return Math.round(bytes / (1024 * 1024)) return Math.round(bytes / (1024 * 1024))
} }
function getTime(
cacheEntries: CacheEntryListener[],
predicate: (value: CacheEntryListener) => number | undefined
): number {
return cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0)
}
function formatSize(bytes: number | undefined): string { function formatSize(bytes: number | undefined): string {
if (bytes === undefined || bytes === 0) { if (bytes === undefined || bytes === 0) {
return '' return ''
} }
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)` return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`
} }
function formatTime(ms: number | undefined): string {
if (ms === undefined || ms === 0) {
return ''
}
return `${ms} ms`
}

View File

@@ -38,13 +38,16 @@ export async function restoreCache(
): Promise<cache.CacheEntry | undefined> { ): Promise<cache.CacheEntry | undefined> {
listener.markRequested(cacheKey, cacheRestoreKeys) listener.markRequested(cacheKey, cacheRestoreKeys)
try { try {
const startTime = Date.now()
// Only override the read timeout if the SEGMENT_DOWNLOAD_TIMEOUT_MINS env var has NOT been set // Only override the read timeout if the SEGMENT_DOWNLOAD_TIMEOUT_MINS env var has NOT been set
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR] const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {} ? {}
: {segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT} : {segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT}
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions) const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions)
if (restoredEntry !== undefined) { if (restoredEntry !== undefined) {
listener.markRestored(restoredEntry.key, restoredEntry.size) const restoreTime = Date.now() - startTime
listener.markRestored(restoredEntry.key, restoredEntry.size, restoreTime)
core.info(`Restored cache entry with key ${cacheKey} to ${cachePath.join()} in ${restoreTime}ms`)
} }
return restoredEntry return restoredEntry
} catch (error) { } catch (error) {
@@ -56,8 +59,11 @@ export async function restoreCache(
export async function saveCache(cachePath: string[], cacheKey: string, listener: CacheEntryListener): Promise<void> { export async function saveCache(cachePath: string[], cacheKey: string, listener: CacheEntryListener): Promise<void> {
try { try {
const startTime = Date.now()
const savedEntry = await cache.saveCache(cachePath, cacheKey) const savedEntry = await cache.saveCache(cachePath, cacheKey)
listener.markSaved(savedEntry.key, savedEntry.size) const saveTime = Date.now() - startTime
listener.markSaved(savedEntry.key, savedEntry.size, saveTime)
core.info(`Saved cache entry with key ${cacheKey} from ${cachePath.join()} in ${saveTime}ms`)
} catch (error) { } catch (error) {
if (error instanceof cache.ReserveCacheError) { if (error instanceof cache.ReserveCacheError) {
listener.markAlreadyExists(cacheKey) listener.markAlreadyExists(cacheKey)

View File

@@ -2,7 +2,6 @@ import path from 'path'
import fs from 'fs' import fs from 'fs'
import * as core from '@actions/core' import * as core from '@actions/core'
import * as glob from '@actions/glob' import * as glob from '@actions/glob'
import * as semver from 'semver'
import {CacheEntryListener, CacheListener} from './cache-reporting' import {CacheEntryListener, CacheListener} from './cache-reporting'
import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCache, tryDelete} from './cache-utils' import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCache, tryDelete} from './cache-utils'
@@ -10,6 +9,7 @@ import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCa
import {BuildResult, loadBuildResults} from '../build-results' import {BuildResult, loadBuildResults} from '../build-results'
import {CacheConfig, ACTION_METADATA_DIR} from '../configuration' import {CacheConfig, ACTION_METADATA_DIR} from '../configuration'
import {getCacheKeyBase} from './cache-key' import {getCacheKeyBase} from './cache-key'
import {versionIsAtLeast} from '../execution/gradle'
const SKIP_RESTORE_VAR = 'GRADLE_BUILD_ACTION_SKIP_RESTORE' const SKIP_RESTORE_VAR = 'GRADLE_BUILD_ACTION_SKIP_RESTORE'
const CACHE_PROTOCOL_VERSION = 'v1' const CACHE_PROTOCOL_VERSION = 'v1'
@@ -132,9 +132,8 @@ abstract class AbstractEntryExtractor {
pattern: string, pattern: string,
listener: CacheEntryListener listener: CacheEntryListener
): Promise<ExtractedCacheEntry> { ): Promise<ExtractedCacheEntry> {
const restoredEntry = await restoreCache([pattern], cacheKey, [], listener) const restoredEntry = await restoreCache(pattern.split('\n'), cacheKey, [], listener)
if (restoredEntry) { if (restoredEntry) {
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`)
return new ExtractedCacheEntry(artifactType, pattern, cacheKey) return new ExtractedCacheEntry(artifactType, pattern, cacheKey)
} else { } else {
core.info(`Did not restore ${artifactType} with key ${cacheKey} to ${pattern}`) core.info(`Did not restore ${artifactType} with key ${cacheKey} to ${pattern}`)
@@ -232,8 +231,7 @@ abstract class AbstractEntryExtractor {
cacheDebug(`No change to previously restored ${artifactType}. Not saving.`) cacheDebug(`No change to previously restored ${artifactType}. Not saving.`)
entryListener.markNotSaved('contents unchanged') entryListener.markNotSaved('contents unchanged')
} else { } else {
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`) await saveCache(pattern.split('\n'), cacheKey, entryListener)
await saveCache([pattern], cacheKey, entryListener)
} }
for (const file of matchingFiles) { for (const file of matchingFiles) {
@@ -434,8 +432,7 @@ export class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
// If any associated build result used Gradle < 8.6, then mark it as not cacheable // If any associated build result used Gradle < 8.6, then mark it as not cacheable
if ( if (
pathResults.find(result => { pathResults.find(result => {
const gradleVersion = semver.coerce(result.gradleVersion) return !versionIsAtLeast(result.gradleVersion, '8.6.0')
return gradleVersion && semver.lt(gradleVersion, '8.6.0')
}) })
) { ) {
core.info( core.info(

View File

@@ -60,7 +60,8 @@ export class GradleUserHomeCache {
restoreKeys:[${cacheKey.restoreKeys}]` restoreKeys:[${cacheKey.restoreKeys}]`
) )
const cacheResult = await restoreCache(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener) const cachePath = this.getCachePath()
const cacheResult = await restoreCache(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener)
if (!cacheResult) { if (!cacheResult) {
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`) core.info(`${this.cacheDescription} cache not found. Will initialize empty.`)
return return
@@ -68,8 +69,6 @@ export class GradleUserHomeCache {
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key) core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key)
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`)
try { try {
await this.afterRestore(listener) await this.afterRestore(listener)
} catch (error) { } catch (error) {
@@ -120,10 +119,8 @@ export class GradleUserHomeCache {
return return
} }
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`)
const cachePath = this.getCachePath() const cachePath = this.getCachePath()
await saveCache(cachePath, cacheKey, gradleHomeEntryListener) await saveCache(cachePath, cacheKey, gradleHomeEntryListener)
return return
} }

View File

@@ -7,7 +7,7 @@ export async function setup(config: BuildScanConfig): Promise<void> {
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions') maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions')
if (config.getBuildScanPublishEnabled()) { if (config.getBuildScanPublishEnabled()) {
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true') maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.17.6') maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.18.1')
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.0') maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.0')
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl()) maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree()) maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())

View File

@@ -72,7 +72,7 @@ class ShortLivedTokenClient {
retryInterval = 1000 retryInterval = 1000
async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise<HostnameAccessKey> { async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise<HostnameAccessKey> {
const queryParams = expiry ? `?expiresInHours${expiry}` : '' const queryParams = expiry ? `?expiresInHours=${expiry}` : ''
const sanitizedServerUrl = !serverUrl.endsWith('/') ? `${serverUrl}/` : serverUrl const sanitizedServerUrl = !serverUrl.endsWith('/') ? `${serverUrl}/` : serverUrl
const headers = { const headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',

View File

@@ -1,6 +1,8 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import * as exec from '@actions/exec' import * as exec from '@actions/exec'
import which from 'which'
import * as semver from 'semver'
import * as provisioner from './provision' import * as provisioner from './provision'
import * as gradlew from './gradlew' import * as gradlew from './gradlew'
@@ -31,3 +33,42 @@ async function executeGradleBuild(executable: string | undefined, root: string,
core.setFailed(`Gradle build failed: see console output for details`) core.setFailed(`Gradle build failed: see console output for details`)
} }
} }
export function versionIsAtLeast(actualVersion: string, requiredVersion: string): boolean {
const splitVersion = actualVersion.split('-')
const coreVersion = splitVersion[0]
const prerelease = splitVersion.length > 1
const actualSemver = semver.coerce(coreVersion)!
const comparisonSemver = semver.coerce(requiredVersion)!
if (prerelease) {
return semver.gt(actualSemver, comparisonSemver)
} else {
return semver.gte(actualSemver, comparisonSemver)
}
}
export async function findGradleVersionOnPath(): Promise<GradleExecutable | undefined> {
const gradleExecutable = await which('gradle', {nothrow: true})
if (gradleExecutable) {
const output = await exec.getExecOutput(gradleExecutable, ['-v'], {silent: true})
const version = parseGradleVersionFromOutput(output.stdout)
return version ? new GradleExecutable(version, gradleExecutable) : undefined
}
return undefined
}
export function parseGradleVersionFromOutput(output: string): string | undefined {
const regex = /Gradle (\d+\.\d+(\.\d+)?(-.*)?)/
const versionString = output.match(regex)?.[1]
return versionString
}
class GradleExecutable {
constructor(
readonly version: string,
readonly executable: string
) {}
}

View File

@@ -1,13 +1,12 @@
import * as fs from 'fs' import * as fs from 'fs'
import * as os from 'os' import * as os from 'os'
import * as path from 'path' import * as path from 'path'
import which from 'which'
import * as httpm from '@actions/http-client' import * as httpm from '@actions/http-client'
import * as core from '@actions/core' import * as core from '@actions/core'
import * as cache from '@actions/cache' import * as cache from '@actions/cache'
import * as exec from '@actions/exec'
import * as toolCache from '@actions/tool-cache' import * as toolCache from '@actions/tool-cache'
import {findGradleVersionOnPath, versionIsAtLeast} from './gradle'
import * as gradlew from './gradlew' import * as gradlew from './gradlew'
import {handleCacheFailure} from '../caching/cache-utils' import {handleCacheFailure} from '../caching/cache-utils'
import {CacheConfig} from '../configuration' import {CacheConfig} from '../configuration'
@@ -26,6 +25,16 @@ export async function provisionGradle(gradleVersion: string): Promise<string | u
return undefined return undefined
} }
/**
* Ensure that the Gradle version on PATH is no older than the specified version.
* If the version on PATH is older, install the specified version and add it to the PATH.
* @return Installed Gradle executable or undefined if no version configured.
*/
export async function provisionGradleAtLeast(gradleVersion: string): Promise<string> {
const installedVersion = await installGradleVersionAtLeast(await gradleRelease(gradleVersion))
return addToPath(installedVersion)
}
async function addToPath(executable: string): Promise<string> { async function addToPath(executable: string): Promise<string> {
core.addPath(path.dirname(executable)) core.addPath(path.dirname(executable))
return executable return executable
@@ -51,7 +60,7 @@ async function resolveGradleVersion(version: string): Promise<GradleVersionInfo>
case 'release-nightly': case 'release-nightly':
return gradleReleaseNightly() return gradleReleaseNightly()
default: default:
return gradle(version) return gradleRelease(version)
} }
} }
@@ -76,7 +85,7 @@ async function gradleReleaseNightly(): Promise<GradleVersionInfo> {
return await gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-nightly`) return await gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-nightly`)
} }
async function gradle(version: string): Promise<GradleVersionInfo> { async function gradleRelease(version: string): Promise<GradleVersionInfo> {
const versionInfo = await findGradleVersionDeclaration(version) const versionInfo = await findGradleVersionDeclaration(version)
if (!versionInfo) { if (!versionInfo) {
throw new Error(`Gradle version ${version} does not exists`) throw new Error(`Gradle version ${version} does not exists`)
@@ -97,10 +106,24 @@ async function findGradleVersionDeclaration(version: string): Promise<GradleVers
async function installGradleVersion(versionInfo: GradleVersionInfo): Promise<string> { async function installGradleVersion(versionInfo: GradleVersionInfo): Promise<string> {
return core.group(`Provision Gradle ${versionInfo.version}`, async () => { return core.group(`Provision Gradle ${versionInfo.version}`, async () => {
const preInstalledGradle = await findGradleVersionOnPath(versionInfo) const gradleOnPath = await findGradleVersionOnPath()
if (preInstalledGradle !== undefined) { if (gradleOnPath?.version === versionInfo.version) {
core.info(`Gradle version ${versionInfo.version} is already available on PATH. Not installing.`) core.info(`Gradle version ${versionInfo.version} is already available on PATH. Not installing.`)
return preInstalledGradle return gradleOnPath.executable
}
return locateGradleAndDownloadIfRequired(versionInfo)
})
}
async function installGradleVersionAtLeast(versionInfo: GradleVersionInfo): Promise<string> {
return core.group(`Provision Gradle >= ${versionInfo.version}`, async () => {
const gradleOnPath = await findGradleVersionOnPath()
if (gradleOnPath && versionIsAtLeast(gradleOnPath.version, versionInfo.version)) {
core.info(
`Gradle version ${gradleOnPath.version} is available on PATH and >= ${versionInfo.version}. Not installing.`
)
return gradleOnPath.executable
} }
return locateGradleAndDownloadIfRequired(versionInfo) return locateGradleAndDownloadIfRequired(versionInfo)
@@ -192,15 +215,3 @@ interface GradleVersionInfo {
version: string version: string
downloadUrl: string downloadUrl: string
} }
async function findGradleVersionOnPath(versionInfo: GradleVersionInfo): Promise<string | undefined> {
const gradleExecutable = await which('gradle', {nothrow: true})
if (gradleExecutable) {
const output = await exec.getExecOutput(gradleExecutable, ['-v'], {silent: true})
if (output.stdout.includes(`Gradle ${versionInfo.version}`)) {
return gradleExecutable
}
}
return undefined
}

View File

@@ -43,7 +43,7 @@ export async function generateJobSummary(
async function addPRComment(jobSummary: string): Promise<void> { async function addPRComment(jobSummary: string): Promise<void> {
const context = github.context const context = github.context
if (context.payload.pull_request == null) { if (context.payload.pull_request == null) {
core.info('No pull_request trigger: not adding PR comment') core.info('No pull_request trigger detected: not adding PR comment')
return return
} }

View File

@@ -1,4 +1,44 @@
[ [
{
"version": "8.11",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-rc-3",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-rc-2",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-rc-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-milestone-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10.2",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10.2-milestone-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10.1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10-rc-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{ {
"version": "8.9", "version": "8.9",
"checksum": "498495120a03b9a6ab5d155f5de3c8f0d986a449153702fb80fc80e134484f17" "checksum": "498495120a03b9a6ab5d155f5de3c8f0d986a449153702fb80fc80e134484f17"

View File

@@ -20,7 +20,7 @@ dependencies {
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') { testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all' exclude group: 'org.codehaus.groovy', module: 'groovy-all'
} }
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.17.2' testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.18.1'
} }
test { test {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "3.17.6" id "com.gradle.develocity" version "3.18.1"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1" id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
} }

View File

@@ -16,25 +16,28 @@ import java.nio.file.Files
import java.util.zip.GZIPOutputStream import java.util.zip.GZIPOutputStream
class BaseInitScriptTest extends Specification { class BaseInitScriptTest extends Specification {
static final String DEVELOCITY_PLUGIN_VERSION = '3.17.6' static final String DEVELOCITY_PLUGIN_VERSION = '3.18.1'
static final String CCUD_PLUGIN_VERSION = '2.0.1' static final String CCUD_PLUGIN_VERSION = '2.0.1'
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9) static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10) static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
static final TestGradleVersion GRADLE_5_X = new TestGradleVersion(GradleVersion.version('5.6.4'), 8, 12) static final TestGradleVersion GRADLE_5_X = new TestGradleVersion(GradleVersion.version('5.6.4'), 8, 12)
static final TestGradleVersion GRADLE_6_0 = new TestGradleVersion(GradleVersion.version('6.0.1'), 8, 13)
static final TestGradleVersion GRADLE_6_NO_BUILD_SERVICE = new TestGradleVersion(GradleVersion.version('6.5.1'), 8, 14) static final TestGradleVersion GRADLE_6_NO_BUILD_SERVICE = new TestGradleVersion(GradleVersion.version('6.5.1'), 8, 14)
static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.4'), 8, 15) static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.4'), 8, 15)
static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19) static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.1.1'), 8, 16)
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19) static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19) static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.9'), 8, 22) static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.10'), 8, 23)
static final List<TestGradleVersion> ALL_VERSIONS = [ static final List<TestGradleVersion> ALL_VERSIONS = [
GRADLE_3_X, // First version where TestKit supports environment variables GRADLE_3_X, // First version where TestKit supports environment variables
GRADLE_4_X, GRADLE_4_X,
GRADLE_5_X, GRADLE_5_X,
GRADLE_6_0,
GRADLE_6_NO_BUILD_SERVICE, // Last version without build service support GRADLE_6_NO_BUILD_SERVICE, // Last version without build service support
GRADLE_6_X, GRADLE_6_X,
GRADLE_7_1,
GRADLE_7_X, GRADLE_7_X,
GRADLE_8_0, GRADLE_8_0,
GRADLE_8_X, GRADLE_8_X,
@@ -44,7 +47,7 @@ class BaseInitScriptTest extends Specification {
[GRADLE_7_X, GRADLE_8_0, GRADLE_8_X] [GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
static final List<TestGradleVersion> SETTINGS_PLUGIN_VERSIONS = static final List<TestGradleVersion> SETTINGS_PLUGIN_VERSIONS =
[GRADLE_6_X, GRADLE_7_X, GRADLE_8_0, GRADLE_8_X] [GRADLE_6_X, GRADLE_7_1, GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
static final String PUBLIC_BUILD_SCAN_ID = 'i2wepy2gr7ovw' static final String PUBLIC_BUILD_SCAN_ID = 'i2wepy2gr7ovw'
static final String DEFAULT_SCAN_UPLOAD_TOKEN = 'scan-upload-token' static final String DEFAULT_SCAN_UPLOAD_TOKEN = 'scan-upload-token'

View File

@@ -196,7 +196,7 @@ class TestBuildResultRecorder extends BaseInitScriptTest {
when: when:
settingsFile.text = """ settingsFile.text = """
plugins { plugins {
id 'com.gradle.develocity' version '3.17.6' apply(false) id 'com.gradle.develocity' version '3.18.1' apply(false)
} }
gradle.settingsEvaluated { gradle.settingsEvaluated {
apply plugin: 'com.gradle.develocity' apply plugin: 'com.gradle.develocity'

View File

@@ -53,8 +53,8 @@ test('will cleanup unused gradle versions', async () => {
const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3") const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3")
const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100") const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100")
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin") const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.9") const gradleCurrent = path.resolve(gradleUserHome, "caches/8.11")
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.106") const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.107")
expect(fs.existsSync(gradle802)).toBe(true) expect(fs.existsSync(gradle802)).toBe(true)
expect(fs.existsSync(transforms3)).toBe(true) expect(fs.existsSync(transforms3)).toBe(true)

View File

@@ -1,3 +1,4 @@
import exp from 'constants'
import {CacheEntryListener, CacheListener} from '../../src/caching/cache-reporting' import {CacheEntryListener, CacheListener} from '../../src/caching/cache-reporting'
describe('caching report', () => { describe('caching report', () => {
@@ -5,7 +6,7 @@ describe('caching report', () => {
it('with one requested entry report', async () => { it('with one requested entry report', async () => {
const report = new CacheListener() const report = new CacheListener()
report.entry('foo').markRequested('1', ['2']) report.entry('foo').markRequested('1', ['2'])
report.entry('bar').markRequested('3').markRestored('4', 500) report.entry('bar').markRequested('3').markRestored('4', 500, 1000)
expect(report.fullyRestored).toBe(false) expect(report.fullyRestored).toBe(false)
}) })
}) })
@@ -22,13 +23,13 @@ describe('caching report', () => {
}) })
it('with restored entry report', async () => { it('with restored entry report', async () => {
const report = new CacheListener() const report = new CacheListener()
report.entry('bar').markRequested('3').markRestored('4', 300) report.entry('bar').markRequested('3').markRestored('4', 300, 1000)
expect(report.fullyRestored).toBe(true) expect(report.fullyRestored).toBe(true)
}) })
it('with multiple restored entry reportss', async () => { it('with multiple restored entry reportss', async () => {
const report = new CacheListener() const report = new CacheListener()
report.entry('foo').markRestored('4', 3300) report.entry('foo').markRestored('4', 3300, 111)
report.entry('bar').markRequested('3').markRestored('4', 333) report.entry('bar').markRequested('3').markRestored('4', 333, 1000)
expect(report.fullyRestored).toBe(true) expect(report.fullyRestored).toBe(true)
}) })
}) })
@@ -64,7 +65,7 @@ describe('caching report', () => {
const report = new CacheListener() const report = new CacheListener()
const entryReport = report.entry('foo') const entryReport = report.entry('foo')
entryReport.markRequested('1', ['2', '3']) entryReport.markRequested('1', ['2', '3'])
entryReport.markSaved('4', 100) entryReport.markSaved('4', 100, 1000)
const stringRep = report.stringify() const stringRep = report.stringify()
const reportClone: CacheListener = CacheListener.rehydrate(stringRep) const reportClone: CacheListener = CacheListener.rehydrate(stringRep)
@@ -73,6 +74,8 @@ describe('caching report', () => {
expect(entryClone.requestedKey).toBe('1') expect(entryClone.requestedKey).toBe('1')
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3']) expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
expect(entryClone.savedKey).toBe('4') expect(entryClone.savedKey).toBe('4')
expect(entryClone.savedSize).toBe(100)
expect(entryClone.savedTime).toBe(1000)
}) })
it('with live entry report', async () => { it('with live entry report', async () => {
const report = new CacheListener() const report = new CacheListener()
@@ -85,7 +88,7 @@ describe('caching report', () => {
// Check type and call method on rehydrated entry report // Check type and call method on rehydrated entry report
expect(entryClone).toBeInstanceOf(CacheEntryListener) expect(entryClone).toBeInstanceOf(CacheEntryListener)
entryClone.markSaved('4', 100) entryClone.markSaved('4', 100, 1000)
expect(entryClone.requestedKey).toBe('1') expect(entryClone.requestedKey).toBe('1')
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3']) expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])

View File

@@ -0,0 +1,104 @@
import { describe } from 'node:test'
import { versionIsAtLeast, parseGradleVersionFromOutput } from '../../src/execution/gradle'
describe('gradle', () => {
describe('can compare version with', () => {
it('same version', async () => {
expect(versionIsAtLeast('6.7.1', '6.7.1')).toBe(true)
expect(versionIsAtLeast('7.0', '7.0')).toBe(true)
expect(versionIsAtLeast('7.0', '7.0.0')).toBe(true)
})
it('newer version', async () => {
expect(versionIsAtLeast('6.7.1', '6.7.2')).toBe(false)
expect(versionIsAtLeast('7.0', '8.0')).toBe(false)
expect(versionIsAtLeast('7.0', '7.0.1')).toBe(false)
})
it('older version', async () => {
expect(versionIsAtLeast('6.7.2', '6.7.1')).toBe(true)
expect(versionIsAtLeast('8.0', '7.0')).toBe(true)
expect(versionIsAtLeast('7.0.1', '7.0')).toBe(true)
})
it('rc version', async () => {
expect(versionIsAtLeast('8.0.2-rc-1', '8.0.1')).toBe(true)
expect(versionIsAtLeast('8.0.2-rc-1', '8.0.2')).toBe(false)
expect(versionIsAtLeast('8.1-rc-1', '8.0')).toBe(true)
expect(versionIsAtLeast('8.0-rc-1', '8.0')).toBe(false)
})
it('snapshot version', async () => {
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.10')).toBe(true)
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.10.1')).toBe(true)
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.11')).toBe(false)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10')).toBe(true)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10.1')).toBe(true)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10.2')).toBe(false)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.11')).toBe(false)
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.0')).toBe(true)
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.0.1')).toBe(true)
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.1')).toBe(false)
})
})
describe('can parse version from output', () => {
it('major version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.9
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.9')
})
it('patch version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.9.1
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.9.1')
})
it('rc version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.9-rc-1
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.9-rc-1')
})
it('milestone version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.0-milestone-6
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.0-milestone-6')
})
it('snapshot version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.10.2-20240828012138+0000
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.10.2-20240828012138+0000')
})
it('branch version', async () => {
const output = `
------------------------------------------------------------
Gradle 9.0-branch-provider_api_migration_public_api_changes-20240830060514+0000
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('9.0-branch-provider_api_migration_public_api_changes-20240830060514+0000')
})
})
})

View File

@@ -114,4 +114,14 @@ describe('short lived tokens', () => {
.resolves .resolves
.toBeNull() .toBeNull()
}) })
it('get short lived token with custom expiry', async () => {
nock('https://dev')
.post('/api/auth/token?expiresInHours=4')
.reply(200, 'token')
expect.assertions(1)
await expect(getToken('dev=key1', '4'))
.resolves
.toEqual({"keys": [{"hostname": "dev", "key": "token"}]})
})
}) })

View File

@@ -37,7 +37,8 @@ test('fetches wrapper jar checksums for snapshots', async () => {
const validChecksums = await checksums.fetchUnknownChecksums(true, new checksums.WrapperChecksums) const validChecksums = await checksums.fetchUnknownChecksums(true, new checksums.WrapperChecksums)
// Expect that at least one snapshot checksum is different from the non-snapshot checksums // Expect that at least one snapshot checksum is different from the non-snapshot checksums
expect(validChecksums.size).toBeGreaterThan(nonSnapshotChecksums.size) expect(nonSnapshotChecksums.size).toBeGreaterThan(10)
expect(validChecksums.size).toBeGreaterThanOrEqual(nonSnapshotChecksums.size)
}) })
test('fetches all wrapper checksum URLS for snapshots', async () => { test('fetches all wrapper checksum URLS for snapshots', async () => {

View File

@@ -4,6 +4,12 @@ The `wrapper-validation` action validates the checksums of _all_ [Gradle Wrapper
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`. The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
> [!NOTE]
> Starting with v4 the `setup-gradle` action will automatically [perform wrapper validation](../docs/setup-gradle.md#gradle-wrapper-validation)
> on each execution.
>
> If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
### Example workflow ### Example workflow
```yaml ```yaml
@@ -19,7 +25,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3 - uses: gradle/actions/wrapper-validation@v4
``` ```
See the [full action documentation](../docs/wrapper-validation.md) for more advanced usage scenarios. See the [full action documentation](../docs/wrapper-validation.md) for more advanced usage scenarios.