mirror of
https://github.com/gradle/actions.git
synced 2025-04-20 09:49:19 +08:00
Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
787f6c043d | ||
|
f0d60a49af | ||
|
4202c42799 | ||
|
42e0af31a2 | ||
|
3a6b53a0d0 | ||
|
0a33d1db58 | ||
|
4193cbbd7b | ||
|
29e1fb0be2 | ||
|
1d43080849 | ||
|
078dac7a70 | ||
|
016b3d4592 | ||
|
e1fcfa43cf | ||
|
8fffbb2bab | ||
|
5d947f45a5 | ||
|
6f6de16adf | ||
|
b9a435f9ef | ||
|
176e6fd709 | ||
|
46c9941b16 | ||
|
7ce44f0335 | ||
|
8d71e4ef38 | ||
|
edf5691417 | ||
|
bf2c378a9b | ||
|
e63ba6843c | ||
|
1ad4e25ca6 | ||
|
db76f3a125 | ||
|
c7df6e23e9 | ||
|
572d36861a | ||
|
df11ab8fb2 | ||
|
dc4f141bca | ||
|
fdc7db9f7f | ||
|
f03547888a | ||
|
f9497366c3 | ||
|
af84fa9a5b | ||
|
294c8b805a | ||
|
bc00207b7b | ||
|
d0cb65a5bc | ||
|
777b8de880 | ||
|
57d85d9e4d | ||
|
5044d2f9c3 | ||
|
831a86f0ed |
2
.github/actions/build-dist/action.yml
vendored
2
.github/actions/build-dist/action.yml
vendored
@ -3,7 +3,7 @@ name: 'Build and upload distribution'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
4
.github/actions/init-integ-test/action.yml
vendored
4
.github/actions/init-integ-test/action.yml
vendored
@ -4,7 +4,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 11
|
||||
@ -17,7 +17,7 @@ runs:
|
||||
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
||||
- name: Download dist
|
||||
if: ${{ env.SKIP_DIST != 'true' && !env.ACT }}
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "3.19.2"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.1"
|
||||
id "com.gradle.develocity" version "4.0"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.2.1"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
// Apply the foojay-resolver plugin to allow automatic download of JDKs
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0"
|
||||
}
|
||||
|
||||
rootProject.name = "java-toolchains"
|
||||
|
@ -8,7 +8,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
api("org.apache.commons:commons-math3:3.6.1")
|
||||
implementation("com.google.guava:guava:33.4.6-jre")
|
||||
implementation("com.google.guava:guava:33.4.8-jre")
|
||||
}
|
||||
|
||||
testing {
|
||||
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("com.gradle.develocity") version "3.19.2"
|
||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.1"
|
||||
id("com.gradle.develocity") version "4.0"
|
||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.2.1"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "3.19.2"
|
||||
id "com.gradle.develocity" version "4.0"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "3.19.2"
|
||||
id "com.gradle.develocity" version "4.0"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "3.19.2"
|
||||
id "com.gradle.develocity" version "4.0"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
6
.github/workflows/ci-check-and-unit-test.yml
vendored
6
.github/workflows/ci-check-and-unit-test.yml
vendored
@ -19,18 +19,18 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: sources/package-lock.json
|
||||
- name: Setup Gradle
|
||||
# Use a released version to avoid breakages
|
||||
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
|
||||
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
|
||||
env:
|
||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||
with:
|
||||
gradle-version: "8.13"
|
||||
gradle-version: '8.13'
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: |
|
||||
|
@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46.0.3
|
||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||
with:
|
||||
files: |
|
||||
dist/**
|
||||
|
4
.github/workflows/ci-codeql.yml
vendored
4
.github/workflows/ci-codeql.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config: |
|
||||
@ -43,4 +43,4 @@ jobs:
|
||||
- sources/src
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
|
||||
|
4
.github/workflows/ci-init-script-check.yml
vendored
4
.github/workflows/ci-init-script-check.yml
vendored
@ -24,13 +24,13 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
- name: Setup Gradle
|
||||
# Use a released version to avoid breakages
|
||||
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
|
||||
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
|
||||
env:
|
||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||
- name: Run integration tests
|
||||
|
2
.github/workflows/ci-ossf-scorecard.yml
vendored
2
.github/workflows/ci-ossf-scorecard.yml
vendored
@ -52,6 +52,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: 'Upload to code-scanning'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
15
.github/workflows/ci-update-dist.yml
vendored
15
.github/workflows/ci-update-dist.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
@ -53,12 +53,23 @@ jobs:
|
||||
run: |
|
||||
cp -r sources/dist .
|
||||
|
||||
- name: Import GPG key to sign commits
|
||||
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
git_config_global: true
|
||||
|
||||
# Commit and push changes; has no effect if the files did not change
|
||||
# Important: The push event will not trigger any other workflows, see
|
||||
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
|
||||
- name: Commit & push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
|
||||
with:
|
||||
commit_author: Bot Githubaction <bot-githubaction@gradle.com>
|
||||
commit_author: bot-githubaction <bot-githubaction@gradle.com>
|
||||
commit_user_name: bot-githubaction
|
||||
commit_user_email: bot-githubaction@gradle.com
|
||||
commit_message: '[bot] Update dist directory'
|
||||
file_pattern: dist
|
||||
|
2
.github/workflows/ci-validate-wrappers.yml
vendored
2
.github/workflows/ci-validate-wrappers.yml
vendored
@ -12,6 +12,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: gradle/actions/wrapper-validation@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
|
||||
- uses: gradle/actions/wrapper-validation@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
|
||||
with:
|
||||
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
|
@ -25,7 +25,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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)}}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@ -41,8 +41,8 @@ jobs:
|
||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||
gradle-version: ${{ matrix.gradle }}
|
||||
build-scan-publish: true
|
||||
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
||||
build-scan-terms-of-use-agree: "yes"
|
||||
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
|
||||
build-scan-terms-of-use-agree: 'yes'
|
||||
- name: Run Gradle build
|
||||
id: gradle
|
||||
working-directory: .github/workflow-samples/no-ge
|
||||
|
@ -178,7 +178,7 @@ jobs:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: Download dependency-graph artifact
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
with:
|
||||
path: downloaded-dependency-graphs
|
||||
pattern: dependency-graph_*dependency-graph-generate-submit-and-upload.json
|
||||
|
@ -63,7 +63,7 @@ jobs:
|
||||
id: gradle-build
|
||||
uses: ./dependency-submission
|
||||
with:
|
||||
gradle-version: 7.0.1
|
||||
gradle-version: '7.0.1'
|
||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||
continue-on-error: true
|
||||
- name: Check step failed
|
||||
|
@ -231,11 +231,11 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1]
|
||||
gradle: ['8.0.2', '7.6.4', '7.1.1', '6.9.4', '6.0.1', '5.6.4', '5.2.1']
|
||||
include:
|
||||
- gradle: 5.6.4
|
||||
- gradle: '5.6.4'
|
||||
build-root-suffix: -gradle-5
|
||||
- gradle: 5.2.1
|
||||
- gradle: '5.2.1'
|
||||
build-root-suffix: -gradle-5
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
@ -65,12 +65,12 @@ jobs:
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Java 20
|
||||
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 20
|
||||
- name: Setup Java 16
|
||||
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 16
|
||||
|
@ -25,25 +25,25 @@ permissions:
|
||||
|
||||
jobs:
|
||||
inject-develocity:
|
||||
env:
|
||||
DEVELOCITY_INJECTION_ENABLED: true
|
||||
DEVELOCITY_URL: https://ge.solutions-team.gradle.com
|
||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.1'
|
||||
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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)}}
|
||||
plugin-version: [3.16.2, 3.19.2]
|
||||
plugin-version: ['3.16.2', '4.0']
|
||||
include:
|
||||
- plugin-version: 3.16.2
|
||||
- plugin-version: '3.16.2'
|
||||
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
|
||||
- plugin-version: 3.19.2
|
||||
- plugin-version: '4.0'
|
||||
accessKeyEnv: DEVELOCITY_ACCESS_KEY
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
DEVELOCITY_INJECTION_ENABLED: true
|
||||
DEVELOCITY_INJECTION_URL: https://ge.solutions-team.gradle.com
|
||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1'
|
||||
${{matrix.accessKeyEnv}}: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
@ -74,15 +74,15 @@ jobs:
|
||||
inject-develocity-with-access-key:
|
||||
env:
|
||||
DEVELOCITY_INJECTION_ENABLED: true
|
||||
DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
|
||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.1'
|
||||
DEVELOCITY_INJECTION_URL: 'https://ge.solutions-team.gradle.com'
|
||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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)}}
|
||||
plugin-version: [3.16.2, 3.19.2]
|
||||
plugin-version: ['3.16.2', '4.0']
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@ -115,18 +115,18 @@ jobs:
|
||||
inject-develocity-short-lived-token-failed:
|
||||
env:
|
||||
DEVELOCITY_INJECTION_ENABLED: true
|
||||
DEVELOCITY_URL: 'https://localhost:3333/'
|
||||
DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||
DEVELOCITY_CCUD_PLUGIN_VERSION: '2.1'
|
||||
DEVELOCITY_INJECTION_URL: 'https://localhost:3333/'
|
||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: ${{ matrix.plugin-version }}
|
||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.1'
|
||||
# Access key also set as an env var, we want to check it does not leak
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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)}}
|
||||
plugin-version: [ 3.16.2, 3.19.2 ]
|
||||
plugin-version: [ '3.16.2', '4.0' ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@ -155,9 +155,9 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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)}}
|
||||
plugin-version: [ 3.16.2, 3.19.2 ]
|
||||
plugin-version: [ '3.16.2', '4.0' ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
@ -41,14 +41,14 @@ jobs:
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||
gradle-version: 6.9
|
||||
gradle-version: '6.9'
|
||||
- name: Test uses Gradle v6.9
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help "-DgradleVersionCheck=6.9"
|
||||
- name: Setup Gradle with v7.1.1
|
||||
uses: ./setup-gradle
|
||||
with:
|
||||
gradle-version: 7.1.1
|
||||
gradle-version: '7.1.1'
|
||||
- name: Test uses Gradle v7.1.1
|
||||
working-directory: .github/workflow-samples/no-wrapper
|
||||
run: gradle help "-DgradleVersionCheck=7.1.1"
|
||||
@ -78,20 +78,20 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
gradle: ["8.13", "8.12", "8.12-rc-1", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1]
|
||||
gradle: ['8.13', '8.12', '8.12-rc-1', '8.9', '8.1', '7.6.4', '6.9.4', '5.6.4', '4.10.3', '3.5.1']
|
||||
os: ${{fromJSON(inputs.runner-os)}}
|
||||
include:
|
||||
- java-version: 11
|
||||
- gradle: 5.6.4
|
||||
- gradle: '5.6.4'
|
||||
build-root-suffix: -gradle-5
|
||||
- gradle: 4.10.3
|
||||
- gradle: '4.10.3'
|
||||
build-root-suffix: -gradle-4
|
||||
- gradle: 3.5.1
|
||||
- gradle: '3.5.1'
|
||||
build-root-suffix: -gradle-4
|
||||
java-version: 8
|
||||
exclude:
|
||||
- os: macos-latest # Java 8 is not supported on macos-latest, so we cannot test Gradle 3.5.1
|
||||
gradle: 3.5.1
|
||||
gradle: '3.5.1'
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@ -100,7 +100,7 @@ jobs:
|
||||
uses: ./.github/actions/init-integ-test
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: ${{ matrix.java-version }}
|
||||
|
14
.github/workflows/update-checksums-file.yml
vendored
14
.github/workflows/update-checksums-file.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
@ -37,12 +37,22 @@ jobs:
|
||||
run: node ../.github/workflows/update-checksums-file.js
|
||||
working-directory: sources
|
||||
|
||||
- name: Import GPG key to sign commits
|
||||
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
git_config_global: true
|
||||
|
||||
# If there are no changes, this action will not create a pull request
|
||||
- name: Create or update pull request
|
||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||
with:
|
||||
branch: bot/wrapper-checksums-update
|
||||
author: Bot Githubaction <bot-githubaction@gradle.com>
|
||||
author: bot-githubaction <bot-githubaction@gradle.com>
|
||||
committer: bot-githubaction <bot-githubaction@gradle.com>
|
||||
commit-message: Update known wrapper checksums
|
||||
title: Update known wrapper checksums
|
||||
# Note: Unfortunately this action cannot trigger the regular workflows for the PR automatically, see
|
||||
|
@ -12,15 +12,16 @@
|
||||
|
||||
## Release gradle/actions
|
||||
- Create a tag for the release. The tag should have the format `v4.1.0`
|
||||
- From CLI: `git tag v4.1.0 && git push --tags`
|
||||
- From CLI: `git tag -s -m "v4.1.0" v4.1.0 && git push --tags`
|
||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||
- 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.
|
||||
- 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
|
||||
- Publish the release.
|
||||
- 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 "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.
|
||||
- From CLI: `git tag -f -s -a -m "v4.0.0" v4 v4.0.0 && git push -f --tags`
|
||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||
|
||||
## Post release steps
|
||||
|
||||
|
84398
dist/dependency-submission/main/index.js
vendored
84398
dist/dependency-submission/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dependency-submission/main/index.js.map
vendored
2
dist/dependency-submission/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
74815
dist/dependency-submission/post/index.js
vendored
74815
dist/dependency-submission/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dependency-submission/post/index.js.map
vendored
2
dist/dependency-submission/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
84398
dist/setup-gradle/main/index.js
vendored
84398
dist/setup-gradle/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/setup-gradle/main/index.js.map
vendored
2
dist/setup-gradle/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
84398
dist/setup-gradle/post/index.js
vendored
84398
dist/setup-gradle/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/setup-gradle/post/index.js.map
vendored
2
dist/setup-gradle/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
94339
dist/wrapper-validation/main/index.js
vendored
94339
dist/wrapper-validation/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/wrapper-validation/main/index.js.map
vendored
2
dist/wrapper-validation/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -86,7 +86,7 @@ In some cases, the default action configuration will not be sufficient, and addi
|
||||
uses: gradle/actions/dependency-submission@v4
|
||||
with:
|
||||
# Use a particular Gradle version instead of the configured wrapper.
|
||||
gradle-version: 8.6
|
||||
gradle-version: '8.6'
|
||||
|
||||
# The gradle project is not in the root of the repository.
|
||||
build-root-directory: my-gradle-project
|
||||
|
@ -101,7 +101,7 @@ The exact syntax depends on whether or not your project is configured with the [
|
||||
- name: Setup Gradle for a non-wrapper project
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: "8.11"
|
||||
gradle-version: '8.11'
|
||||
|
||||
- name: Assemble the project
|
||||
run: gradle assemble
|
||||
|
@ -60,7 +60,7 @@ Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid havi
|
||||
- name: Setup Gradle 8.10
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: "8.10" # Quotes required to prevent YAML converting to number
|
||||
gradle-version: '8.10' # Quotes required to prevent YAML converting to number
|
||||
- name: Build with Gradle 8.10
|
||||
run: gradle build
|
||||
```
|
||||
@ -220,7 +220,7 @@ jobs:
|
||||
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: 8.6
|
||||
gradle-version: '8.6'
|
||||
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||
- run: gradle build --configuration-cache
|
||||
```
|
||||
@ -474,7 +474,7 @@ jobs:
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
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'
|
||||
|
||||
- run: ./gradlew build --scan
|
||||
```
|
||||
@ -675,7 +675,7 @@ jobs:
|
||||
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
|
||||
run: ./gradlew build
|
||||
env:
|
||||
GRADLE_PLUGIN_REPOSITORY_URL: "https://gradle-plugins-proxy.mycorp.com"
|
||||
GRADLE_PLUGIN_REPOSITORY_URL: 'https://gradle-plugins-proxy.mycorp.com'
|
||||
|
||||
# Set the following variables if your custom plugin repository requires authentication
|
||||
# GRADLE_PLUGIN_REPOSITORY_USERNAME: "username"
|
||||
@ -746,8 +746,8 @@ To publish to https://scans.gradle.com, you must specify in your workflow that y
|
||||
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"
|
||||
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
|
||||
@ -783,7 +783,7 @@ To avoid this, use the `develocity-token-expiry` parameter to specify a differen
|
||||
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-token-expiry: '8' # The number of hours that the access token should remain valid (max 24).
|
||||
```
|
||||
|
||||
### Develocity access key supplied as environment variable
|
||||
@ -837,14 +837,14 @@ Here's a minimal example:
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
develocity-injection-enabled: true
|
||||
develocity-url: https://develocity.your-server.com
|
||||
develocity-plugin-version: 3.17.5
|
||||
develocity-url: 'https://develocity.your-server.com'
|
||||
develocity-plugin-version: '4.0'
|
||||
|
||||
- name: Run a Gradle build with Develocity injection enabled
|
||||
run: ./gradlew build
|
||||
```
|
||||
|
||||
This configuration will automatically apply `v3.19.2` 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` 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.
|
||||
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:
|
||||
@ -857,10 +857,10 @@ In the likely scenario that your Develocity server requires authentication, you
|
||||
|
||||
- name: Run a Gradle build with Develocity injection enabled
|
||||
run: ./gradlew build
|
||||
env:
|
||||
DEVELOCITY_INJECTION_ENABLED: true
|
||||
DEVELOCITY_URL: https://develocity.your-server.com
|
||||
DEVELOCITY_PLUGIN_VERSION: 3.17
|
||||
with:
|
||||
develocity-injection-enabled: true
|
||||
develocity-url: 'https://develocity.your-server.com'
|
||||
develocity-plugin-version: '4.0'
|
||||
```
|
||||
|
||||
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.
|
||||
@ -870,7 +870,7 @@ This access key will be used during the action execution to get a short-lived to
|
||||
The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below:
|
||||
|
||||
| Variable | Required | Description |
|
||||
|--------------------------------------| --- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|--------------------------------------| :---: |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| develocity-injection-enabled | :white_check_mark: | enables Develocity injection |
|
||||
| develocity-url | :white_check_mark: | the URL of the Develocity server |
|
||||
| develocity-allow-untrusted-server | | allow communication with an untrusted server; set to _true_ if your Develocity instance is using a self-signed certificate |
|
||||
@ -884,18 +884,18 @@ The `init-script` supports several additional configuration parameters that you
|
||||
|
||||
The input parameters can be expressed as environment variables following the relationships outlined in the table below:
|
||||
|
||||
| Input | Environment Variable |
|
||||
|--------------------------------------|--------------------------------------|
|
||||
| develocity-injection-enabled | DEVELOCITY_INJECTION_ENABLED |
|
||||
| develocity-url | DEVELOCITY_URL |
|
||||
| develocity-allow-untrusted-server | DEVELOCITY_ALLOW_UNTRUSTED_SERVER |
|
||||
| develocity-capture-file-fingerprints | DEVELOCITY_CAPTURE_FILE_FINGERPRINTS |
|
||||
| develocity-enforce-url | DEVELOCITY_ENFORCE_URL |
|
||||
| develocity-plugin-version | DEVELOCITY_PLUGIN_VERSION |
|
||||
| develocity-ccud-plugin-version | DEVELOCITY_CCUD_PLUGIN_VERSION |
|
||||
| gradle-plugin-repository-url | GRADLE_PLUGIN_REPOSITORY_URL |
|
||||
| gradle-plugin-repository-username | GRADLE_PLUGIN_REPOSITORY_USERNAME |
|
||||
| gradle-plugin-repository-password | GRADLE_PLUGIN_REPOSITORY_PASSWORD |
|
||||
| Input | Environment Variable |
|
||||
|--------------------------------------|------------------------------------------------|
|
||||
| develocity-injection-enabled | DEVELOCITY_INJECTION_ENABLED |
|
||||
| develocity-url | DEVELOCITY_INJECTION_URL |
|
||||
| develocity-enforce-url | DEVELOCITY_INJECTION_ENFORCE_URL |
|
||||
| develocity-allow-untrusted-server | DEVELOCITY_INJECTION_ALLOW_UNTRUSTED_SERVER |
|
||||
| develocity-capture-file-fingerprints | DEVELOCITY_INJECTION_CAPTURE_FILE_FINGERPRINTS |
|
||||
| develocity-plugin-version | DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION |
|
||||
| develocity-ccud-plugin-version | DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION |
|
||||
| gradle-plugin-repository-url | DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_URL |
|
||||
| gradle-plugin-repository-username | DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_USERNAME|
|
||||
| gradle-plugin-repository-password | DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_PASSWORD|
|
||||
|
||||
|
||||
Here's an example using the env vars:
|
||||
@ -908,10 +908,10 @@ Here's an example using the env vars:
|
||||
run: ./gradlew build
|
||||
env:
|
||||
DEVELOCITY_INJECTION_ENABLED: true
|
||||
DEVELOCITY_URL: https://develocity.your-server.com
|
||||
DEVELOCITY_ENFORCE_URL: true
|
||||
DEVELOCITY_PLUGIN_VERSION: "3.19"
|
||||
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.1"
|
||||
DEVELOCITY_INJECTION_URL: https://develocity.your-server.com
|
||||
DEVELOCITY_INJECTION_ENFORCE_URL: true
|
||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: '4.0'
|
||||
DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION: '2.2.1'
|
||||
```
|
||||
|
||||
# Dependency verification
|
||||
|
@ -1,3 +0,0 @@
|
||||
dist/
|
||||
lib/
|
||||
node_modules/
|
@ -1,57 +0,0 @@
|
||||
{
|
||||
"plugins": ["jest", "@typescript-eslint"],
|
||||
"extends": ["plugin:github/recommended"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"rules": {
|
||||
"eslint-comments/no-use": "off",
|
||||
"import/no-namespace": "off",
|
||||
"i18n-text/no-en": "off",
|
||||
"no-unused-vars": "off",
|
||||
"no-shadow": "off",
|
||||
"sort-imports": "off",
|
||||
"github/array-foreach": "off",
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
|
||||
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
|
||||
"@typescript-eslint/no-require-imports": "error",
|
||||
"@typescript-eslint/array-type": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
"camelcase": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
|
||||
"@typescript-eslint/func-call-spacing": ["error", "never"],
|
||||
"@typescript-eslint/no-array-constructor": "error",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/no-extraneous-class": "error",
|
||||
"@typescript-eslint/no-for-in-array": "error",
|
||||
"@typescript-eslint/no-inferrable-types": "error",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-shadow": "error",
|
||||
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||
"@typescript-eslint/no-useless-constructor": "error",
|
||||
"@typescript-eslint/no-var-requires": "error",
|
||||
"@typescript-eslint/prefer-for-of": "warn",
|
||||
"@typescript-eslint/prefer-function-type": "warn",
|
||||
"@typescript-eslint/prefer-includes": "error",
|
||||
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
||||
"@typescript-eslint/promise-function-async": "error",
|
||||
"@typescript-eslint/require-array-sort-compare": ["error", {"ignoreStringArrays": true}],
|
||||
"@typescript-eslint/restrict-plus-operands": "error",
|
||||
"semi": "off",
|
||||
"@typescript-eslint/semi": ["error", "never"],
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"@typescript-eslint/unbound-method": "error"
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"jest/globals": true
|
||||
}
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
# Configuration file for asdf version manager
|
||||
nodejs 20.10.0
|
||||
nodejs 20.19.0
|
||||
gradle 8.13
|
||||
|
70
sources/eslint.config.mjs
Normal file
70
sources/eslint.config.mjs
Normal file
@ -0,0 +1,70 @@
|
||||
import globals from "globals";
|
||||
import typescriptParser from "@typescript-eslint/parser";
|
||||
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
|
||||
|
||||
export default {
|
||||
|
||||
plugins: {
|
||||
"@typescript-eslint": typescriptPlugin,
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
|
||||
ecmaVersion: 9,
|
||||
sourceType: "module",
|
||||
|
||||
parser: typescriptParser,
|
||||
parserOptions: {
|
||||
project: "./tsconfig.json",
|
||||
},
|
||||
},
|
||||
|
||||
files: ['**/*.ts', '**/*.tsx'],
|
||||
|
||||
rules: {
|
||||
camelcase: "off",
|
||||
semi: "off",
|
||||
|
||||
"@typescript-eslint/explicit-member-accessibility": ["error", {
|
||||
accessibility: "no-public",
|
||||
}],
|
||||
|
||||
"@typescript-eslint/no-require-imports": "error",
|
||||
"@typescript-eslint/array-type": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
|
||||
"@typescript-eslint/explicit-function-return-type": ["error", {
|
||||
allowExpressions: true,
|
||||
}],
|
||||
|
||||
"@typescript-eslint/no-array-constructor": "error",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/no-extraneous-class": "error",
|
||||
"@typescript-eslint/no-for-in-array": "error",
|
||||
"@typescript-eslint/no-inferrable-types": "error",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-shadow": "error",
|
||||
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||
"@typescript-eslint/no-useless-constructor": "error",
|
||||
"@typescript-eslint/no-var-requires": "error",
|
||||
"@typescript-eslint/prefer-for-of": "warn",
|
||||
"@typescript-eslint/prefer-function-type": "warn",
|
||||
"@typescript-eslint/prefer-includes": "error",
|
||||
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
||||
"@typescript-eslint/promise-function-async": "error",
|
||||
|
||||
"@typescript-eslint/require-array-sort-compare": ["error", {
|
||||
ignoreStringArrays: true,
|
||||
}],
|
||||
|
||||
"@typescript-eslint/restrict-plus-operands": "error",
|
||||
"@typescript-eslint/unbound-method": "error",
|
||||
},
|
||||
};
|
@ -6,5 +6,9 @@ module.exports = {
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest'
|
||||
},
|
||||
reporters: [
|
||||
'default',
|
||||
'@gradle/develocity-agent/jest-reporter',
|
||||
],
|
||||
verbose: true
|
||||
}
|
||||
|
13415
sources/package-lock.json
generated
13415
sources/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -40,9 +40,9 @@
|
||||
"@actions/glob": "0.5.0",
|
||||
"@actions/http-client": "2.2.3",
|
||||
"@actions/tool-cache": "2.0.2",
|
||||
"@octokit/rest": "21.1.1",
|
||||
"@octokit/request-error": "5.1.1",
|
||||
"@octokit/webhooks-types": "7.6.1",
|
||||
"cheerio": "^1.0.0",
|
||||
"cheerio": "1.0.0",
|
||||
"semver": "7.7.1",
|
||||
"string-argv": "0.3.2",
|
||||
"typed-rest-client": "2.1.0",
|
||||
@ -50,23 +50,31 @@
|
||||
"which": "5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gradle/develocity-agent": "https://develocity-npm-pkgs.gradle.com/gradle-develocity-agent-0.9.0.tgz",
|
||||
"@gradle/develocity-agent": "https://develocity-npm-pkgs.gradle.com/gradle-develocity-agent-0.10.0.tgz",
|
||||
"@jest/globals": "29.7.0",
|
||||
"@types/jest": "29.5.14",
|
||||
"@types/node": "20.17.27",
|
||||
"@types/node": "20.17.30",
|
||||
"@types/semver": "7.7.0",
|
||||
"@types/unzipper": "0.10.11",
|
||||
"@types/which": "3.0.4",
|
||||
"@typescript-eslint/parser": "7.18.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.30.1",
|
||||
"@typescript-eslint/parser": "8.29.1",
|
||||
"@vercel/ncc": "0.38.3",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-plugin-github": "5.1.8",
|
||||
"eslint-plugin-jest": "28.11.0",
|
||||
"dedent": "1.5.3",
|
||||
"eslint": "9.24.0",
|
||||
"globals": "16.0.0",
|
||||
"jest": "29.7.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"nock": "13.5.6",
|
||||
"npm-run-all": "4.1.5",
|
||||
"patch-package": "8.0.0",
|
||||
"prettier": "3.5.3",
|
||||
"ts-jest": "29.3.0",
|
||||
"typescript": "5.8.2"
|
||||
"ts-jest": "29.3.2",
|
||||
"typescript": "5.8.3"
|
||||
},
|
||||
"overrides": {
|
||||
"@azure/logger": "1.1.4",
|
||||
"@octokit/request": "8.4.1",
|
||||
"@octokit/request-error": "5.1.1",
|
||||
"@octokit/plugin-paginate-rest": "9.2.2"
|
||||
}
|
||||
}
|
||||
|
@ -1,48 +0,0 @@
|
||||
diff --git a/node_modules/@azure/logger/dist-esm/src/debug.js b/node_modules/@azure/logger/dist-esm/src/debug.js
|
||||
index d202779..30e8313 100644
|
||||
--- a/node_modules/@azure/logger/dist-esm/src/debug.js
|
||||
+++ b/node_modules/@azure/logger/dist-esm/src/debug.js
|
||||
@@ -7,7 +7,7 @@ let enabledNamespaces = [];
|
||||
let skippedNamespaces = [];
|
||||
const debuggers = [];
|
||||
if (debugEnvVariable) {
|
||||
- enable(debugEnvVariable);
|
||||
+ // enable(debugEnvVariable);
|
||||
}
|
||||
const debugObj = Object.assign((namespace) => {
|
||||
return createDebugger(namespace);
|
||||
diff --git a/node_modules/@azure/logger/dist-esm/src/index.js b/node_modules/@azure/logger/dist-esm/src/index.js
|
||||
index cc25720..2925db5 100644
|
||||
--- a/node_modules/@azure/logger/dist-esm/src/index.js
|
||||
+++ b/node_modules/@azure/logger/dist-esm/src/index.js
|
||||
@@ -20,7 +20,7 @@ if (logLevelFromEnv) {
|
||||
setLogLevel(logLevelFromEnv);
|
||||
}
|
||||
else {
|
||||
- console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||
+ console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
diff --git a/node_modules/@azure/logger/dist/index.js b/node_modules/@azure/logger/dist/index.js
|
||||
index 81e97c3..a415e2f 100644
|
||||
--- a/node_modules/@azure/logger/dist/index.js
|
||||
+++ b/node_modules/@azure/logger/dist/index.js
|
||||
@@ -21,7 +21,7 @@ let enabledNamespaces = [];
|
||||
let skippedNamespaces = [];
|
||||
const debuggers = [];
|
||||
if (debugEnvVariable) {
|
||||
- enable(debugEnvVariable);
|
||||
+ // enable(debugEnvVariable);
|
||||
}
|
||||
const debugObj = Object.assign((namespace) => {
|
||||
return createDebugger(namespace);
|
||||
@@ -125,7 +125,7 @@ if (logLevelFromEnv) {
|
||||
setLogLevel(logLevelFromEnv);
|
||||
}
|
||||
else {
|
||||
- console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||
+ console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||
}
|
||||
}
|
||||
/**
|
@ -44,7 +44,7 @@ export class CacheCleaner {
|
||||
.filter(Boolean) as string[]
|
||||
|
||||
return await provisioner.provisionGradleWithVersionAtLeast(preferredVersion, wrapperScripts)
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
// Ignore the case where the preferred version cannot be located in https://services.gradle.org/versions/all.
|
||||
// This can happen for snapshot Gradle versions.
|
||||
core.info(
|
||||
|
@ -4,28 +4,40 @@ import {setupToken} from './short-lived-token'
|
||||
|
||||
export async function setup(config: BuildScanConfig): Promise<void> {
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_INIT_SCRIPT_NAME', 'gradle-actions.inject-develocity.init.gradle')
|
||||
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_CUSTOM_VALUE', 'gradle-actions')
|
||||
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_ENABLED', config.getDevelocityInjectionEnabled())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_URL', config.getDevelocityUrl())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_ALLOW_UNTRUSTED_SERVER', config.getDevelocityAllowUntrustedServer())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_CAPTURE_FILE_FINGERPRINTS', config.getDevelocityCaptureFileFingerprints())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_ENFORCE_URL', config.getDevelocityEnforceUrl())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_PLUGIN_VERSION', config.getDevelocityPluginVersion())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_CCUD_PLUGIN_VERSION', config.getDevelocityCcudPluginVersion())
|
||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_URL', config.getGradlePluginRepositoryUrl())
|
||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getGradlePluginRepositoryUsername())
|
||||
maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getGradlePluginRepositoryPassword())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_URL', config.getDevelocityUrl())
|
||||
maybeExportVariableNotEmpty(
|
||||
'DEVELOCITY_INJECTION_ALLOW_UNTRUSTED_SERVER',
|
||||
config.getDevelocityAllowUntrustedServer()
|
||||
)
|
||||
maybeExportVariableNotEmpty(
|
||||
'DEVELOCITY_INJECTION_CAPTURE_FILE_FINGERPRINTS',
|
||||
config.getDevelocityCaptureFileFingerprints()
|
||||
)
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_ENFORCE_URL', config.getDevelocityEnforceUrl())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', config.getDevelocityPluginVersion())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', config.getDevelocityCcudPluginVersion())
|
||||
maybeExportVariableNotEmpty('DEVELOCITY_INJECTION__PLUGIN_REPOSITORY_URL', config.getGradlePluginRepositoryUrl())
|
||||
maybeExportVariableNotEmpty(
|
||||
'DEVELOCITY_INJECTION__PLUGIN_REPOSITORY_USERNAME',
|
||||
config.getGradlePluginRepositoryUsername()
|
||||
)
|
||||
maybeExportVariableNotEmpty(
|
||||
'DEVELOCITY_INJECTION__PLUGIN_REPOSITORY_PASSWORD',
|
||||
config.getGradlePluginRepositoryPassword()
|
||||
)
|
||||
|
||||
// If build-scan-publish is enabled, ensure the environment variables are set
|
||||
// The DEVELOCITY_PLUGIN_VERSION and DEVELOCITY_CCUD_PLUGIN_VERSION are set to the latest versions
|
||||
// except if they are defined in the configuration
|
||||
if (config.getBuildScanPublishEnabled()) {
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
|
||||
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.19.2')
|
||||
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.1')
|
||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
|
||||
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION', '4.0')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION', '2.1')
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
|
||||
maybeExportVariable('DEVELOCITY_INJECTION_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())
|
||||
}
|
||||
|
||||
return setupToken(
|
||||
|
@ -106,7 +106,7 @@ class ShortLivedTokenClient {
|
||||
// This should be only 404
|
||||
attempts++
|
||||
if (attempts === this.maxRetries) {
|
||||
return new Promise((resolve, reject) =>
|
||||
return new Promise((_resolve, reject) =>
|
||||
reject(
|
||||
new Error(
|
||||
`Develocity short lived token request failed ${serverUrl} with status code ${response.message.statusCode}`
|
||||
@ -117,12 +117,12 @@ class ShortLivedTokenClient {
|
||||
} catch (error) {
|
||||
attempts++
|
||||
if (attempts === this.maxRetries) {
|
||||
return new Promise((resolve, reject) => reject(error))
|
||||
return new Promise((_resolve, reject) => reject(error))
|
||||
}
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, this.retryInterval))
|
||||
}
|
||||
return new Promise((resolve, reject) => reject(new Error('Illegal state')))
|
||||
return new Promise((_resolve, reject) => reject(new Error('Illegal state')))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ export function handlePostActionError(error: unknown): void {
|
||||
core.info(error.stack)
|
||||
}
|
||||
} else {
|
||||
core.warning(`Unhandled error in Gradle post-action - job will continue: ${error}`)
|
||||
core.warning(`Unhandled error in Gradle post-action. Job will continue: ${error}`)
|
||||
if (error instanceof Error && error.stack) {
|
||||
core.info(error.stack)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Initscript for injection of Develocity into Gradle builds.
|
||||
* Version: 1.2
|
||||
* Version: 2.0
|
||||
*/
|
||||
|
||||
import org.gradle.util.GradleVersion
|
||||
@ -18,36 +18,37 @@ initscript {
|
||||
return gradle.startParameter.systemPropertiesArgs[name] ?: System.getProperty(name) ?: System.getenv(envVarName)
|
||||
}
|
||||
|
||||
def requestedInitScriptName = getInputParam(gradle, 'develocity.injection.init-script-name')
|
||||
def requestedInitScriptName = getInputParam(gradle, 'develocity-injection.init-script-name')
|
||||
def initScriptName = buildscript.sourceFile.name
|
||||
if (requestedInitScriptName != initScriptName) {
|
||||
return
|
||||
}
|
||||
|
||||
// Plugin loading is only required for Develocity injection. Abort early if not enabled.
|
||||
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam(gradle, "develocity.injection-enabled"))
|
||||
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam(gradle, "develocity-injection.enabled"))
|
||||
if (!develocityInjectionEnabled) {
|
||||
return
|
||||
}
|
||||
|
||||
def pluginRepositoryUrl = getInputParam(gradle, 'gradle.plugin-repository.url')
|
||||
def pluginRepositoryUsername = getInputParam(gradle, 'gradle.plugin-repository.username')
|
||||
def pluginRepositoryPassword = getInputParam(gradle, 'gradle.plugin-repository.password')
|
||||
def develocityPluginVersion = getInputParam(gradle, 'develocity.plugin.version')
|
||||
def ccudPluginVersion = getInputParam(gradle, 'develocity.ccud-plugin.version')
|
||||
def pluginRepositoryUrl = getInputParam(gradle, 'develocity-injection.plugin-repository.url')
|
||||
def pluginRepositoryUsername = getInputParam(gradle, 'develocity-injection.plugin-repository.username')
|
||||
def pluginRepositoryPassword = getInputParam(gradle, 'develocity-injection.plugin-repository.password')
|
||||
def develocityPluginVersion = getInputParam(gradle, 'develocity-injection.develocity-plugin.version')
|
||||
def ccudPluginVersion = getInputParam(gradle, 'develocity-injection.ccud-plugin.version')
|
||||
def logLevel = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.debug')) ? LogLevel.LIFECYCLE : LogLevel.INFO
|
||||
|
||||
def atLeastGradle5 = GradleVersion.current() >= GradleVersion.version('5.0')
|
||||
def atLeastGradle4 = GradleVersion.current() >= GradleVersion.version('4.0')
|
||||
|
||||
if (develocityPluginVersion || ccudPluginVersion && atLeastGradle4) {
|
||||
pluginRepositoryUrl = pluginRepositoryUrl ?: 'https://plugins.gradle.org/m2'
|
||||
logger.lifecycle("Develocity plugins resolution: $pluginRepositoryUrl")
|
||||
logger.log(logLevel, "Develocity plugins resolution: $pluginRepositoryUrl")
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = pluginRepositoryUrl
|
||||
if (pluginRepositoryUsername && pluginRepositoryPassword) {
|
||||
logger.lifecycle("Using credentials for plugin repository")
|
||||
logger.log(logLevel, "Using credentials for plugin repository")
|
||||
credentials {
|
||||
username = pluginRepositoryUsername
|
||||
password = pluginRepositoryPassword
|
||||
@ -90,15 +91,15 @@ if (!isTopLevelBuild) {
|
||||
return
|
||||
}
|
||||
|
||||
def requestedInitScriptName = getInputParam(gradle, 'develocity.injection.init-script-name')
|
||||
def requestedInitScriptName = getInputParam(gradle, 'develocity-injection.init-script-name')
|
||||
def initScriptName = buildscript.sourceFile.name
|
||||
if (requestedInitScriptName != initScriptName) {
|
||||
logger.quiet("Ignoring init script '${initScriptName}' as requested name '${requestedInitScriptName}' does not match")
|
||||
return
|
||||
}
|
||||
|
||||
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam(gradle, "develocity.injection-enabled"))
|
||||
def develocityInjectionEnabled = Boolean.parseBoolean(getInputParam(gradle, "develocity-injection.enabled"))
|
||||
if (develocityInjectionEnabled) {
|
||||
if (requestedInitScriptName != initScriptName) {
|
||||
logger.log(LogLevel.WARN, "Develocity injection not enabled because requested init script name was '${requestedInitScriptName}', but '${initScriptName}' was expected")
|
||||
return
|
||||
}
|
||||
enableDevelocityInjection()
|
||||
}
|
||||
|
||||
@ -106,6 +107,10 @@ if (develocityInjectionEnabled) {
|
||||
def buildScanCollector = new BuildScanCollector()
|
||||
def buildScanCaptureEnabled = buildScanCollector.metaClass.respondsTo(buildScanCollector, 'captureBuildScanLink', String)
|
||||
if (buildScanCaptureEnabled) {
|
||||
if (requestedInitScriptName != initScriptName) {
|
||||
logger.log(LogLevel.WARN, "Build Scan capture not enabled because requested init script name was '${requestedInitScriptName}', but '${initScriptName}' was expected")
|
||||
return
|
||||
}
|
||||
enableBuildScanLinkCapture(buildScanCollector)
|
||||
}
|
||||
|
||||
@ -122,16 +127,17 @@ void enableDevelocityInjection() {
|
||||
def CCUD_PLUGIN_ID = 'com.gradle.common-custom-user-data-gradle-plugin'
|
||||
def CCUD_PLUGIN_CLASS = 'com.gradle.CommonCustomUserDataGradlePlugin'
|
||||
|
||||
def develocityUrl = getInputParam(gradle, 'develocity.url')
|
||||
def develocityAllowUntrustedServer = Boolean.parseBoolean(getInputParam(gradle, 'develocity.allow-untrusted-server'))
|
||||
def develocityEnforceUrl = Boolean.parseBoolean(getInputParam(gradle, 'develocity.enforce-url'))
|
||||
def buildScanUploadInBackground = Boolean.parseBoolean(getInputParam(gradle, 'develocity.build-scan.upload-in-background'))
|
||||
def develocityCaptureFileFingerprints = getInputParam(gradle, 'develocity.capture-file-fingerprints') ? Boolean.parseBoolean(getInputParam(gradle, 'develocity.capture-file-fingerprints')) : true
|
||||
def develocityPluginVersion = getInputParam(gradle, 'develocity.plugin.version')
|
||||
def ccudPluginVersion = getInputParam(gradle, 'develocity.ccud-plugin.version')
|
||||
def buildScanTermsOfUseUrl = getInputParam(gradle, 'develocity.terms-of-use.url')
|
||||
def buildScanTermsOfUseAgree = getInputParam(gradle, 'develocity.terms-of-use.agree')
|
||||
def ciAutoInjectionCustomValueValue = getInputParam(gradle, 'develocity.auto-injection.custom-value')
|
||||
def develocityUrl = getInputParam(gradle, 'develocity-injection.url')
|
||||
def develocityAllowUntrustedServer = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.allow-untrusted-server'))
|
||||
def develocityEnforceUrl = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.enforce-url'))
|
||||
def buildScanUploadInBackground = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.upload-in-background'))
|
||||
def develocityCaptureFileFingerprints = getInputParam(gradle, 'develocity-injection.capture-file-fingerprints') ? Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.capture-file-fingerprints')) : true
|
||||
def develocityPluginVersion = getInputParam(gradle, 'develocity-injection.develocity-plugin.version')
|
||||
def ccudPluginVersion = getInputParam(gradle, 'develocity-injection.ccud-plugin.version')
|
||||
def buildScanTermsOfUseUrl = getInputParam(gradle, 'develocity-injection.terms-of-use.url')
|
||||
def buildScanTermsOfUseAgree = getInputParam(gradle, 'develocity-injection.terms-of-use.agree')
|
||||
def ciAutoInjectionCustomValueValue = getInputParam(gradle, 'develocity-injection.custom-value')
|
||||
def logLevel = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.debug')) ? LogLevel.LIFECYCLE : LogLevel.INFO
|
||||
|
||||
def atLeastGradle5 = GradleVersion.current() >= GradleVersion.version('5.0')
|
||||
def atLeastGradle4 = GradleVersion.current() >= GradleVersion.version('4.0')
|
||||
@ -145,22 +151,22 @@ void enableDevelocityInjection() {
|
||||
}
|
||||
|
||||
def printEnforcingDevelocityUrl = {
|
||||
logger.lifecycle("Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
|
||||
logger.log(logLevel, "Enforcing Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer")
|
||||
}
|
||||
|
||||
def printAcceptingGradleTermsOfUse = {
|
||||
logger.lifecycle("Accepting Gradle Terms of Use: $buildScanTermsOfUseUrl")
|
||||
logger.log(logLevel, "Accepting Gradle Terms of Use: $buildScanTermsOfUseUrl")
|
||||
}
|
||||
|
||||
// finish early if DV plugin version is unsupported (v3.6.4 is the minimum version tested and supports back to DV 2021.1)
|
||||
if (develocityPluginVersion && isNotAtLeast(develocityPluginVersion, '3.6.4')) {
|
||||
logger.warn("Develocity Gradle plugin must be at least 3.6.4. Configured version is $develocityPluginVersion.")
|
||||
logger.log(LogLevel.WARN, "Develocity Gradle plugin must be at least 3.6.4. Configured version is $develocityPluginVersion.")
|
||||
return
|
||||
}
|
||||
|
||||
// finish early if configuration parameters passed in via system properties are not valid/supported
|
||||
if (ccudPluginVersion && isNotAtLeast(ccudPluginVersion, '1.7')) {
|
||||
logger.warn("Common Custom User Data Gradle plugin must be at least 1.7. Configured version is $ccudPluginVersion.")
|
||||
logger.log(LogLevel.WARN, "Common Custom User Data Gradle plugin must be at least 1.7. Configured version is $ccudPluginVersion.")
|
||||
return
|
||||
}
|
||||
|
||||
@ -187,7 +193,7 @@ void enableDevelocityInjection() {
|
||||
{ rootExtension }
|
||||
)
|
||||
if (develocityUrl) {
|
||||
logger.lifecycle("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
logger.log(logLevel, "Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
rootExtension.server = develocityUrl
|
||||
rootExtension.allowUntrustedServer = develocityAllowUntrustedServer
|
||||
}
|
||||
@ -197,7 +203,7 @@ void enableDevelocityInjection() {
|
||||
}
|
||||
buildScanExtension.value CI_AUTO_INJECTION_CUSTOM_VALUE_NAME, ciAutoInjectionCustomValueValue
|
||||
if (isAtLeast(develocityPluginVersion, '2.1') && atLeastGradle5) {
|
||||
logger.lifecycle("Setting captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
logger.log(logLevel, "Setting captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
if (isAtLeast(develocityPluginVersion, '3.17')) {
|
||||
buildScanExtension.capture.fileFingerprints.set(develocityCaptureFileFingerprints)
|
||||
} else if (isAtLeast(develocityPluginVersion, '3.7')) {
|
||||
@ -225,7 +231,7 @@ void enableDevelocityInjection() {
|
||||
develocity.buildScan.termsOfUseAgree = buildScanTermsOfUseAgree
|
||||
}
|
||||
|
||||
logger.lifecycle("Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
logger.log(logLevel, "Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
develocity.buildScan.uploadInBackground = buildScanUploadInBackground
|
||||
},
|
||||
{ buildScan ->
|
||||
@ -250,7 +256,7 @@ void enableDevelocityInjection() {
|
||||
|
||||
// uploadInBackground available for build-scan-plugin 3.3.4 and later only
|
||||
if (buildScan.metaClass.respondsTo(buildScan, 'setUploadInBackground', Boolean)) {
|
||||
logger.lifecycle("Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
logger.log(logLevel, "Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
buildScan.uploadInBackground = buildScanUploadInBackground
|
||||
}
|
||||
}
|
||||
@ -261,7 +267,7 @@ void enableDevelocityInjection() {
|
||||
it.moduleVersion.with { group == "com.gradle" && name == "common-custom-user-data-gradle-plugin" }
|
||||
}
|
||||
if (!ccudPluginComponent) {
|
||||
logger.lifecycle("Applying $CCUD_PLUGIN_CLASS with version $ccudPluginVersion via init script")
|
||||
logger.log(logLevel, "Applying $CCUD_PLUGIN_CLASS with version $ccudPluginVersion via init script")
|
||||
pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS))
|
||||
}
|
||||
}
|
||||
@ -274,7 +280,7 @@ void enableDevelocityInjection() {
|
||||
def pluginClass = dvOrGe(DEVELOCITY_PLUGIN_CLASS, GRADLE_ENTERPRISE_PLUGIN_CLASS)
|
||||
applyPluginExternally(settings.pluginManager, pluginClass, develocityPluginVersion)
|
||||
if (develocityUrl) {
|
||||
logger.lifecycle("Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
logger.log(logLevel, "Connection to Develocity: $develocityUrl, allowUntrustedServer: $develocityAllowUntrustedServer, captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
eachDevelocitySettingsExtension(settings) { ext ->
|
||||
// server and allowUntrustedServer must be configured via buildScan extension for gradle-enterprise-plugin 3.1.1 and earlier
|
||||
if (ext.metaClass.respondsTo(ext, 'getServer')) {
|
||||
@ -293,13 +299,13 @@ void enableDevelocityInjection() {
|
||||
|
||||
eachDevelocitySettingsExtension(settings,
|
||||
{ develocity ->
|
||||
logger.lifecycle("Setting captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
logger.log(logLevel, "Setting captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
develocity.buildScan.capture.fileFingerprints = develocityCaptureFileFingerprints
|
||||
},
|
||||
{ gradleEnterprise ->
|
||||
gradleEnterprise.buildScan.publishAlways()
|
||||
if (isAtLeast(develocityPluginVersion, '2.1')) {
|
||||
logger.lifecycle("Setting captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
logger.log(logLevel, "Setting captureFileFingerprints: $develocityCaptureFileFingerprints")
|
||||
if (isAtLeast(develocityPluginVersion, '3.7')) {
|
||||
gradleEnterprise.buildScan.capture.taskInputFiles = develocityCaptureFileFingerprints
|
||||
} else {
|
||||
@ -325,7 +331,7 @@ void enableDevelocityInjection() {
|
||||
develocity.buildScan.termsOfUseAgree = buildScanTermsOfUseAgree
|
||||
}
|
||||
|
||||
logger.lifecycle("Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
logger.log(logLevel, "Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
develocity.buildScan.uploadInBackground = buildScanUploadInBackground
|
||||
},
|
||||
{ gradleEnterprise ->
|
||||
@ -349,7 +355,7 @@ void enableDevelocityInjection() {
|
||||
|
||||
// uploadInBackground available for gradle-enterprise-plugin 3.3.4 and later only
|
||||
if (gradleEnterprise.buildScan.metaClass.respondsTo(gradleEnterprise.buildScan, 'setUploadInBackground', Boolean)) {
|
||||
logger.lifecycle("Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
logger.log(logLevel, "Setting uploadInBackground: $buildScanUploadInBackground")
|
||||
gradleEnterprise.buildScan.uploadInBackground = buildScanUploadInBackground
|
||||
}
|
||||
}
|
||||
@ -357,7 +363,7 @@ void enableDevelocityInjection() {
|
||||
|
||||
if (ccudPluginVersion) {
|
||||
if (!settings.pluginManager.hasPlugin(CCUD_PLUGIN_ID)) {
|
||||
logger.lifecycle("Applying $CCUD_PLUGIN_CLASS with version $ccudPluginVersion via init script")
|
||||
logger.log(logLevel, "Applying $CCUD_PLUGIN_CLASS with version $ccudPluginVersion via init script")
|
||||
settings.pluginManager.apply(initscript.classLoader.loadClass(CCUD_PLUGIN_CLASS))
|
||||
}
|
||||
}
|
||||
@ -366,7 +372,8 @@ void enableDevelocityInjection() {
|
||||
}
|
||||
|
||||
void applyPluginExternally(def pluginManager, String pluginClassName, String pluginVersion) {
|
||||
logger.lifecycle("Applying $pluginClassName with version $pluginVersion via init script")
|
||||
def logLevel = Boolean.parseBoolean(getInputParam(gradle, 'develocity-injection.debug')) ? LogLevel.LIFECYCLE : LogLevel.INFO
|
||||
logger.log(logLevel, "Applying $pluginClassName with version $pluginVersion via init script")
|
||||
|
||||
def externallyApplied = 'develocity.externally-applied'
|
||||
def externallyAppliedDeprecated = 'gradle.enterprise.externally-applied'
|
||||
|
@ -80,7 +80,7 @@ async function addDistributionSnapshotChecksumUrls(checksumUrls: [string, string
|
||||
|
||||
// // Find all links ending with '-wrapper.jar.sha256'
|
||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]')
|
||||
wrapperChecksumLinks.each((index, element) => {
|
||||
wrapperChecksumLinks.each((_index, element) => {
|
||||
const url = $(element).attr('href')!
|
||||
|
||||
// Extract the version from the url
|
||||
|
@ -1,4 +1,20 @@
|
||||
[
|
||||
{
|
||||
"version": "9.0-milestone-1",
|
||||
"checksum": "9687bf4e8beb2c293cfd1393cbf2854ef68f921757302116033f476289abf7b0"
|
||||
},
|
||||
{
|
||||
"version": "8.14-rc-1",
|
||||
"checksum": "7d3a4ac4de1c32b59bc6a4eb8ecb8e612ccd0cf1ae1e99f66902da64df296172"
|
||||
},
|
||||
{
|
||||
"version": "8.14-milestone-8",
|
||||
"checksum": "81a82aaea5abcc8ff68b3dfcb58b3c3c429378efd98e7433460610fecd7ae45f"
|
||||
},
|
||||
{
|
||||
"version": "8.14-milestone-7",
|
||||
"checksum": "81a82aaea5abcc8ff68b3dfcb58b3c3c429378efd98e7433460610fecd7ae45f"
|
||||
},
|
||||
{
|
||||
"version": "8.14-milestone-5",
|
||||
"checksum": "81a82aaea5abcc8ff68b3dfcb58b3c3c429378efd98e7433460610fecd7ae45f"
|
||||
|
@ -20,7 +20,7 @@ dependencies {
|
||||
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
|
||||
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
||||
}
|
||||
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.18.2'
|
||||
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.18.3'
|
||||
}
|
||||
|
||||
test {
|
||||
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id "com.gradle.develocity" version "3.19.2"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.1"
|
||||
id "com.gradle.develocity" version "4.0"
|
||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.2.1"
|
||||
}
|
||||
|
||||
develocity {
|
||||
|
@ -16,7 +16,7 @@ import java.nio.file.Files
|
||||
import java.util.zip.GZIPOutputStream
|
||||
|
||||
class BaseInitScriptTest extends Specification {
|
||||
static final String DEVELOCITY_PLUGIN_VERSION = '3.19.2'
|
||||
static final String DEVELOCITY_PLUGIN_VERSION = '4.0'
|
||||
static final String CCUD_PLUGIN_VERSION = '2.1'
|
||||
|
||||
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
|
||||
|
@ -248,7 +248,7 @@ task expectFailure {
|
||||
when:
|
||||
settingsFile.text = """
|
||||
plugins {
|
||||
id 'com.gradle.develocity' version '3.19.2' apply(false)
|
||||
id 'com.gradle.develocity' version '4.0' apply(false)
|
||||
}
|
||||
gradle.settingsEvaluated {
|
||||
apply plugin: 'com.gradle.develocity'
|
||||
|
@ -490,41 +490,43 @@ class TestDevelocityInjection extends BaseInitScriptTest {
|
||||
|
||||
def getEnvVars() {
|
||||
Map<String, String> envVars = [
|
||||
DEVELOCITY_INJECTION_INIT_SCRIPT_NAME : "gradle-actions.inject-develocity.init.gradle",
|
||||
DEVELOCITY_INJECTION_ENABLED : "true",
|
||||
DEVELOCITY_URL : serverUrl,
|
||||
DEVELOCITY_ALLOW_UNTRUSTED_SERVER : "true",
|
||||
DEVELOCITY_PLUGIN_VERSION : develocityPluginVersion,
|
||||
DEVELOCITY_BUILD_SCAN_UPLOAD_IN_BACKGROUND: "true", // Need to upload in background since our Mock server doesn't cope with foreground upload
|
||||
DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE : 'gradle-actions'
|
||||
DEVELOCITY_INJECTION_INIT_SCRIPT_NAME : "gradle-actions.inject-develocity.init.gradle",
|
||||
DEVELOCITY_INJECTION_ENABLED : "true",
|
||||
DEVELOCITY_INJECTION_URL : serverUrl,
|
||||
DEVELOCITY_INJECTION_ALLOW_UNTRUSTED_SERVER : "true",
|
||||
DEVELOCITY_INJECTION_DEVELOCITY_PLUGIN_VERSION: develocityPluginVersion,
|
||||
DEVELOCITY_INJECTION_UPLOAD_IN_BACKGROUND : "true", // Need to upload in background since our Mock server doesn't cope with foreground upload
|
||||
DEVELOCITY_INJECTION_CUSTOM_VALUE : 'gradle-actions',
|
||||
DEVELOCITY_INJECTION_DEBUG : "true"
|
||||
]
|
||||
if (enforceUrl) envVars.put("DEVELOCITY_ENFORCE_URL", "true")
|
||||
if (ccudPluginVersion != null) envVars.put("DEVELOCITY_CCUD_PLUGIN_VERSION", ccudPluginVersion)
|
||||
if (pluginRepositoryUrl != null) envVars.put("GRADLE_PLUGIN_REPOSITORY_URL", pluginRepositoryUrl)
|
||||
if (pluginRepositoryUsername != null) envVars.put("GRADLE_PLUGIN_REPOSITORY_USERNAME", pluginRepositoryUsername)
|
||||
if (pluginRepositoryPassword != null) envVars.put("GRADLE_PLUGIN_REPOSITORY_PASSWORD", pluginRepositoryPassword)
|
||||
if (captureFileFingerprints) envVars.put("DEVELOCITY_CAPTURE_FILE_FINGERPRINTS", "true")
|
||||
if (enforceUrl) envVars.put("DEVELOCITY_INJECTION_ENFORCE_URL", "true")
|
||||
if (ccudPluginVersion != null) envVars.put("DEVELOCITY_INJECTION_CCUD_PLUGIN_VERSION", ccudPluginVersion)
|
||||
if (captureFileFingerprints) envVars.put("DEVELOCITY_INJECTION_CAPTURE_FILE_FINGERPRINTS", "true")
|
||||
if (pluginRepositoryUrl != null) envVars.put("DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_URL", pluginRepositoryUrl)
|
||||
if (pluginRepositoryUsername != null) envVars.put("DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_USERNAME", pluginRepositoryUsername)
|
||||
if (pluginRepositoryPassword != null) envVars.put("DEVELOCITY_INJECTION_PLUGIN_REPOSITORY_PASSWORD", pluginRepositoryPassword)
|
||||
|
||||
return envVars
|
||||
}
|
||||
|
||||
def getJvmArgs() {
|
||||
List<String> jvmArgs = [
|
||||
"-Ddevelocity.injection.init-script-name=gradle-actions.inject-develocity.init.gradle",
|
||||
"-Ddevelocity.injection-enabled=true",
|
||||
"-Ddevelocity.url=$serverUrl",
|
||||
"-Ddevelocity.allow-untrusted-server=true",
|
||||
"-Ddevelocity.plugin.version=$develocityPluginVersion",
|
||||
"-Ddevelocity.build-scan.upload-in-background=true",
|
||||
"-Ddevelocity.auto-injection.custom-value=gradle-actions"
|
||||
"-Ddevelocity-injection.init-script-name=gradle-actions.inject-develocity.init.gradle",
|
||||
"-Ddevelocity-injection.enabled=true",
|
||||
"-Ddevelocity-injection.url=$serverUrl",
|
||||
"-Ddevelocity-injection.allow-untrusted-server=true",
|
||||
"-Ddevelocity-injection.develocity-plugin.version=$develocityPluginVersion",
|
||||
"-Ddevelocity-injection.upload-in-background=true",
|
||||
"-Ddevelocity-injection.custom-value=gradle-actions",
|
||||
"-Ddevelocity-injection.debug=true"
|
||||
]
|
||||
|
||||
if (enforceUrl) jvmArgs.add("-Ddevelocity.enforce-url=true")
|
||||
if (ccudPluginVersion != null) jvmArgs.add("-Ddevelocity.ccud-plugin.version=$ccudPluginVersion")
|
||||
if (pluginRepositoryUrl != null) jvmArgs.add("-Dgradle.plugin-repository.url=$pluginRepositoryUrl")
|
||||
if (pluginRepositoryUsername != null) jvmArgs.add("-Dgradle.plugin-repository.username=$pluginRepositoryUsername")
|
||||
if (pluginRepositoryPassword != null) jvmArgs.add("-Dgradle.plugin-repository.password=$pluginRepositoryPassword")
|
||||
if (captureFileFingerprints) jvmArgs.add("-Ddevelocity.capture-file-fingerprints=true")
|
||||
if (enforceUrl) jvmArgs.add("-Ddevelocity-injection.enforce-url=true")
|
||||
if (ccudPluginVersion != null) jvmArgs.add("-Ddevelocity-injection.ccud-plugin.version=$ccudPluginVersion")
|
||||
if (captureFileFingerprints) jvmArgs.add("-Ddevelocity-injection.capture-file-fingerprints=true")
|
||||
if (pluginRepositoryUrl != null) jvmArgs.add("-Ddevelocity-injection.plugin-repository.url=$pluginRepositoryUrl")
|
||||
if (pluginRepositoryUsername != null) jvmArgs.add("-Ddevelocity-injection.plugin-repository.username=$pluginRepositoryUsername")
|
||||
if (pluginRepositoryPassword != null) jvmArgs.add("-Ddevelocity-injection.plugin-repository.password=$pluginRepositoryPassword")
|
||||
|
||||
return jvmArgs.collect { it.toString() } // Convert from GStrings
|
||||
}
|
||||
|
@ -80,14 +80,14 @@ test('will cleanup unused gradle versions', async () => {
|
||||
})
|
||||
|
||||
async function runGradleBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
||||
const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||
await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||
cwd: projectRoot
|
||||
})
|
||||
console.log(`Gradle User Home initialized with commons_math3_version=${version} ${args}`)
|
||||
}
|
||||
|
||||
async function runGradleWrapperBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
||||
const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||
await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||
cwd: projectRoot
|
||||
})
|
||||
console.log(`Gradle User Home initialized with commons_math3_version="${version}" ${args}`)
|
||||
|
@ -32,8 +32,8 @@
|
||||
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
/* Additional Checks */
|
||||
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
||||
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
||||
"noUnusedLocals": true, /* Report errors on unused locals. */
|
||||
"noUnusedParameters": true, /* Report errors on unused parameters. */
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user