Skip to content

Commit

Permalink
feat(manager/gradle): Use dependencies task when generating verificat…
Browse files Browse the repository at this point in the history
…ion metadata (#29602)
  • Loading branch information
raphiz committed Jun 11, 2024
1 parent c21e78f commit 8975c9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/modules/manager/gradle/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ describe('modules/manager/gradle/artifacts', () => {
]);
expect(execSnapshots).toMatchObject([
{
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256 help',
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256 dependencies',
options: {
cwd: '/tmp/github/some/repo',
stdio: ['pipe', 'ignore', 'pipe'],
Expand Down Expand Up @@ -662,7 +662,7 @@ describe('modules/manager/gradle/artifacts', () => {
},
},
{
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256 help',
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256 dependencies',
options: {
cwd: '/tmp/github/some/repo',
stdio: ['pipe', 'ignore', 'pipe'],
Expand Down Expand Up @@ -705,7 +705,7 @@ describe('modules/manager/gradle/artifacts', () => {

expect(execSnapshots).toMatchObject([
{
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256 help',
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256 dependencies',
options: {
cwd: '/tmp/github/some/repo',
stdio: ['pipe', 'ignore', 'pipe'],
Expand Down Expand Up @@ -747,7 +747,7 @@ describe('modules/manager/gradle/artifacts', () => {

expect(execSnapshots).toMatchObject([
{
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256,pgp help',
cmd: './gradlew --console=plain --dependency-verification lenient -q --write-verification-metadata sha256,pgp dependencies',
options: {
cwd: '/tmp/github/some/repo',
stdio: ['pipe', 'ignore', 'pipe'],
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/gradle/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ async function buildUpdateVerificationMetadataCmd(
if (!hashTypes.length) {
return null;
}
return `${baseCmd} --write-verification-metadata ${hashTypes.join(',')} help`;
return `${baseCmd} --write-verification-metadata ${hashTypes.join(',')} dependencies`;
}

export async function updateArtifacts({
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/gradle/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ As the output of these commands can be very large, any text other than errors (i

### Dependency verification

If Renovate finds a `gradle/verification-metadata.xml` file, it updates the content by using the `gradle --write-verification-metadata <hashTypes>` command.
If Renovate finds a `gradle/verification-metadata.xml` file, it updates the content by using the `gradle --write-verification-metadata <hashTypes> dependencies` command.
Renovate will check the file for existing hash types (like `sha256`) and use them as `<hashTypes>`.

<!-- prettier-ignore -->
Expand Down

0 comments on commit 8975c9b

Please sign in to comment.