Compare commits

..

7 Commits

Author SHA1 Message Date
Jerome Prinet
e48ea170d2 Add debug logs 2025-07-24 09:21:11 +02:00
Jerome Prinet
aac6626d42 Try to remove retries 2025-07-23 18:30:37 +02:00
Jerome Prinet
d45eec9a5e Run tests on candidate which requires JDK 17 in a specific job 2025-07-23 17:50:24 +02:00
Jerome Prinet
1b708738f6 Configure Java 17 when relevant 2025-07-23 17:39:55 +02:00
Jerome Prinet
3574b901d9 Configure Java 17 when relevant 2025-07-23 17:20:59 +02:00
Jérôme Prinet
19d90431a4 Merge branch 'main' into jprinet/bump-jdk-version 2025-07-21 14:45:23 +02:00
Jerome Prinet
b8ceb1b11e Bump JDK to 17 to match Gradle 9 requirements 2025-07-16 15:50:39 +02:00
37 changed files with 5219 additions and 5935 deletions

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "4.1" id "com.gradle.develocity" version "4.0.2"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.3" id "com.gradle.common-custom-user-data-gradle-plugin" version "2.3"
} }

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id("com.gradle.develocity") version "4.1" id("com.gradle.develocity") version "4.0.2"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.3" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.3"
} }

View File

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

View File

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

View File

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

View File

@@ -43,7 +43,7 @@ jobs:
npm run compile npm run compile
working-directory: sources working-directory: sources
env: env:
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload' NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com' DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}' DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
@@ -52,6 +52,6 @@ jobs:
npm test npm test
working-directory: sources working-directory: sources
env: env:
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload' NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com' DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}' DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'

View File

@@ -35,7 +35,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4 uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
config: | config: |
@@ -43,4 +43,4 @@ jobs:
- sources/src - sources/src
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4 uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0

View File

@@ -52,6 +52,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning' - name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4 uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@@ -45,7 +45,7 @@ jobs:
npm run compile npm run compile
working-directory: sources working-directory: sources
env: env:
NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload' NODE_OPTIONS: '-r @gradle/develocity-agent/preload'
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com' DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}' DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'

View File

@@ -30,11 +30,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', '4.1'] plugin-version: ['3.16.2', '4.0.2']
include: include:
- plugin-version: '3.16.2' - plugin-version: '3.16.2'
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
- plugin-version: '4.1' - plugin-version: '4.0.2'
accessKeyEnv: DEVELOCITY_ACCESS_KEY accessKeyEnv: DEVELOCITY_ACCESS_KEY
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
@@ -82,7 +82,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', '4.1'] plugin-version: ['3.16.2', '4.0.2']
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources
@@ -126,7 +126,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', '4.1' ] plugin-version: [ '3.16.2', '4.0.2' ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
@@ -157,7 +157,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', '4.1' ] plugin-version: [ '3.16.2', '4.0.2' ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout sources - name: Checkout sources

View File

@@ -81,6 +81,7 @@ jobs:
uses: ./.github/actions/init-integ-test uses: ./.github/actions/init-integ-test
with: with:
java-version: '17' java-version: '17'
- name: Setup Gradle with release-candidate - name: Setup Gradle with release-candidate
uses: ./setup-gradle uses: ./setup-gradle
with: with:

2
build
View File

@@ -3,7 +3,7 @@
cd sources cd sources
if [[ -f ~/.gradle/develocity/keys.properties ]]; then if [[ -f ~/.gradle/develocity/keys.properties ]]; then
export NODE_OPTIONS='-r @gradle-tech/develocity-agent/preload' export NODE_OPTIONS='-r @gradle/develocity-agent/preload'
export DEVELOCITY_URL=https://ge.solutions-team.gradle.com export DEVELOCITY_URL=https://ge.solutions-team.gradle.com
export DEVELOCITY_ACCESS_KEY=$(paste -sd ';' ~/.gradle/develocity/keys.properties) export DEVELOCITY_ACCESS_KEY=$(paste -sd ';' ~/.gradle/develocity/keys.properties)
fi fi

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -847,7 +847,7 @@ Here's a minimal example:
run: ./gradlew build run: ./gradlew build
``` ```
This configuration will automatically apply `v4.1` 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 `v4.0.2` 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:

View File

@@ -8,7 +8,7 @@ module.exports = {
}, },
reporters: [ reporters: [
'default', 'default',
'@gradle-tech/develocity-agent/jest-reporter', '@gradle/develocity-agent/jest-reporter',
], ],
verbose: true verbose: true
} }

2245
sources/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -41,31 +41,32 @@
"@actions/http-client": "2.2.3", "@actions/http-client": "2.2.3",
"@actions/tool-cache": "2.0.2", "@actions/tool-cache": "2.0.2",
"@octokit/webhooks-types": "7.6.1", "@octokit/webhooks-types": "7.6.1",
"cheerio": "1.1.2", "cheerio": "1.1.0",
"semver": "7.7.2", "semver": "7.7.2",
"string-argv": "0.3.2", "string-argv": "0.3.2",
"typed-rest-client": "2.1.0",
"unhomoglyph": "1.0.6", "unhomoglyph": "1.0.6",
"which": "5.0.0" "which": "5.0.0"
}, },
"devDependencies": { "devDependencies": {
"@gradle-tech/develocity-agent": "1.0.1", "@gradle/develocity-agent": "https://develocity-npm-pkgs.gradle.com/gradle-develocity-agent-0.10.0.tgz",
"@jest/globals": "30.0.5", "@jest/globals": "29.7.0",
"@types/jest": "30.0.0", "@types/jest": "29.5.14",
"@types/node": "24.1.0", "@types/node": "20.19.0",
"@types/semver": "7.7.0", "@types/semver": "7.7.0",
"@types/unzipper": "0.10.11", "@types/unzipper": "0.10.11",
"@types/which": "3.0.4", "@types/which": "3.0.4",
"@typescript-eslint/eslint-plugin": "8.38.0", "@typescript-eslint/eslint-plugin": "8.34.0",
"@vercel/ncc": "0.38.3", "@vercel/ncc": "0.38.3",
"dedent": "1.6.0", "dedent": "1.6.0",
"eslint": "9.24.0", "eslint": "9.24.0",
"globals": "16.3.0", "globals": "16.2.0",
"jest": "30.0.5", "jest": "29.7.0",
"nock": "13.5.6", "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.6.2", "prettier": "3.5.3",
"ts-jest": "29.4.0", "ts-jest": "29.3.4",
"typescript": "5.8.3" "typescript": "5.8.3"
}, },
"overrides": { "overrides": {

View File

@@ -34,7 +34,7 @@ export async function setup(config: BuildScanConfig): Promise<void> {
// except if they are defined in the configuration // except if they are defined in the configuration
if (config.getBuildScanPublishEnabled()) { if (config.getBuildScanPublishEnabled()) {
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true') maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.1') maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.0.2')
maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1') maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1')
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl()) maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree()) maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())

View File

@@ -1,6 +1,7 @@
import * as httpm from 'typed-rest-client/HttpClient'
import * as cheerio from 'cheerio' import * as cheerio from 'cheerio'
import * as core from '@actions/core' import * as core from '@actions/core'
import * as httpm from '@actions/http-client' //import * as httpm from '@actions/http-client'
import fileWrapperChecksums from './wrapper-checksums.json' import fileWrapperChecksums from './wrapper-checksums.json'
@@ -69,20 +70,23 @@ async function httpGetJsonArray(url: string): Promise<unknown[]> {
} }
async function httpGetText(url: string): Promise<string> { async function httpGetText(url: string): Promise<string> {
const maxAttempts = 4 const response = await httpc.get(url)
let attempts = 0 return await response.readBody()
while (attempts < maxAttempts) {
try { // const maxAttempts = 4
const response = await httpc.get(url) // let attempts = 0
return await response.readBody() // while (attempts < maxAttempts) {
} catch (error) { // try {
attempts++ // const response = await httpc.get(url)
if (attempts === maxAttempts) { // return await response.readBody()
return new Promise((_resolve, reject) => reject(error)) // } catch (error) {
} // attempts++
} // if (attempts === maxAttempts) {
} // return new Promise((_resolve, reject) => reject(error))
return new Promise((_resolve, reject) => reject(new Error('Illegal state'))) // }
// }
// }
// return new Promise((_resolve, reject) => reject(new Error('Illegal state')))
} }
async function addDistributionSnapshotChecksumUrls(checksumUrls: [string, string][]): Promise<void> { async function addDistributionSnapshotChecksumUrls(checksumUrls: [string, string][]): Promise<void> {

View File

@@ -1,3 +1,5 @@
import * as core from '@actions/core'
import * as find from './find' import * as find from './find'
import * as checksums from './checksums' import * as checksums from './checksums'
import * as hash from './hash' import * as hash from './hash'
@@ -21,6 +23,16 @@ export async function findInvalidWrapperJars(
previouslyValidatedChecksums.includes(sha) || previouslyValidatedChecksums.includes(sha) ||
knownValidChecksums.checksums.has(sha) knownValidChecksums.checksums.has(sha)
) { ) {
if (allowedChecksums.includes(sha)) {
core.info("Found allowed Gradle Wrapper JAR file: " + sha)
}
if (previouslyValidatedChecksums.includes(sha)) {
core.info(`Found previously validated Gradle Wrapper JAR file: ${sha}`)
}
if(knownValidChecksums.checksums.has(sha)) {
core.info(`Found known valid Gradle Wrapper JAR file: ${sha}`)
}
result.valid.push(new WrapperJar(wrapperJar, sha)) result.valid.push(new WrapperJar(wrapperJar, sha))
} else { } else {
notYetValidatedWrappers.push(new WrapperJar(wrapperJar, sha)) notYetValidatedWrappers.push(new WrapperJar(wrapperJar, sha))
@@ -36,6 +48,7 @@ export async function findInvalidWrapperJars(
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) { if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
result.invalid.push(wrapperJar) result.invalid.push(wrapperJar)
} else { } else {
core.info(`Fall back - Found valid Gradle Wrapper JAR file: ${wrapperJar.checksum}`)
result.valid.push(wrapperJar) result.valid.push(wrapperJar)
} }
} }

View File

@@ -17,6 +17,8 @@ export async function validateWrappers(
const allowedChecksums = process.env['ALLOWED_GRADLE_WRAPPER_CHECKSUMS']?.split(',') || [] const allowedChecksums = process.env['ALLOWED_GRADLE_WRAPPER_CHECKSUMS']?.split(',') || []
const previouslyValidatedChecksums = checksumCache.load() const previouslyValidatedChecksums = checksumCache.load()
core.info(`gradleUserHome = ${gradleUserHome}`)
core.info(`Previously validated checksums loaded from cache: ${previouslyValidatedChecksums.join(', ')}`)
const result = await findInvalidWrapperJars( const result = await findInvalidWrapperJars(
workspaceRoot, workspaceRoot,

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.19.2' testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.19.1'
} }
test { test {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=8fad3d78296ca518113f3d29016617c7f9367dc005f932bd9d93bf45ba46072b distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015 the original authors. # Copyright © 2015-2021 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
plugins { plugins {
id "com.gradle.develocity" version "4.1" id "com.gradle.develocity" version "4.0.2"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.3" id "com.gradle.common-custom-user-data-gradle-plugin" version "2.3"
} }

View File

@@ -16,7 +16,7 @@ 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 = '4.1' static final String DEVELOCITY_PLUGIN_VERSION = '4.0.2'
static final String CCUD_PLUGIN_VERSION = '2.1' static final String CCUD_PLUGIN_VERSION = '2.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)

View File

@@ -248,7 +248,7 @@ task expectFailure {
when: when:
settingsFile.text = """ settingsFile.text = """
plugins { plugins {
id 'com.gradle.develocity' version '4.1' apply(false) id 'com.gradle.develocity' version '4.0.2' apply(false)
} }
gradle.settingsEvaluated { gradle.settingsEvaluated {
apply plugin: 'com.gradle.develocity' apply plugin: 'com.gradle.develocity'