feat(manager/gradle): Use dependencies task when generating verification metadata (#29602)

This commit is contained in:
Raphi 2024-06-11 20:02:50 +02:00 committed by GitHub
parent c21e78f08a
commit 8975c9bda6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -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'],
@ -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'],
@ -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'],
@ -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'],

View file

@ -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({

View file

@ -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 -->