mirror of
				https://hub.gitmirror.com/https://github.com/gradle/actions.git
				synced 2025-11-04 12:00:01 +08:00 
			
		
		
		
	Compare commits
	
		
			No commits in common. "main" and "v2.0-rc.3" have entirely different histories.
		
	
	
		
	
		
							
								
								
									
										52
									
								
								.eslintrc.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								.eslintrc.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,52 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "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",
 | 
				
			||||||
 | 
					      "no-unused-vars": "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": "warn",
 | 
				
			||||||
 | 
					      "@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
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
							
								
								
									
										29
									
								
								.github/actions/build-dist/action.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.github/actions/build-dist/action.yml
									
									
									
									
										vendored
									
									
								
							@ -1,29 +0,0 @@
 | 
				
			|||||||
name: 'Build and upload distribution'
 | 
					 | 
				
			||||||
# Builds the action distribution an uploads as an artifact for later download
 | 
					 | 
				
			||||||
runs:
 | 
					 | 
				
			||||||
  using: "composite"
 | 
					 | 
				
			||||||
  steps: 
 | 
					 | 
				
			||||||
    - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        node-version: 24
 | 
					 | 
				
			||||||
        cache: npm
 | 
					 | 
				
			||||||
        cache-dependency-path: sources/package-lock.json
 | 
					 | 
				
			||||||
    - name: Build distribution
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        npm -v
 | 
					 | 
				
			||||||
        node -v
 | 
					 | 
				
			||||||
        npm install
 | 
					 | 
				
			||||||
        npm run build
 | 
					 | 
				
			||||||
      working-directory: sources
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Copy the generated sources/dist directory to the top-level dist
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        cp -r sources/dist .
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Upload distribution
 | 
					 | 
				
			||||||
      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        name: dist
 | 
					 | 
				
			||||||
        path: dist/
 | 
					 | 
				
			||||||
							
								
								
									
										29
									
								
								.github/actions/init-integ-test/action.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.github/actions/init-integ-test/action.yml
									
									
									
									
										vendored
									
									
								
							@ -1,29 +0,0 @@
 | 
				
			|||||||
name: 'Initialize integ-test'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
inputs:
 | 
					 | 
				
			||||||
  java-version:
 | 
					 | 
				
			||||||
    description: 'Java version to use'
 | 
					 | 
				
			||||||
    required: false
 | 
					 | 
				
			||||||
    default: '17'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
runs:
 | 
					 | 
				
			||||||
  using: "composite"
 | 
					 | 
				
			||||||
  steps: 
 | 
					 | 
				
			||||||
    - name: Setup Java
 | 
					 | 
				
			||||||
      uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        distribution: 'temurin'
 | 
					 | 
				
			||||||
        java-version: ${{ inputs.java-version }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Configure environment
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "ALLOWED_GRADLE_WRAPPER_CHECKSUMS=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" >> "$GITHUB_ENV"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # 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@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        name: dist
 | 
					 | 
				
			||||||
        path: dist/
 | 
					 | 
				
			||||||
							
								
								
									
										3
									
								
								.github/dco.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/dco.yml
									
									
									
									
										vendored
									
									
								
							@ -1,3 +0,0 @@
 | 
				
			|||||||
# Disable sign-off checking for members of the Gradle GitHub organization
 | 
					 | 
				
			||||||
require:
 | 
					 | 
				
			||||||
  members: false
 | 
					 | 
				
			||||||
							
								
								
									
										49
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										49
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							@ -1,49 +0,0 @@
 | 
				
			|||||||
version: 2
 | 
					 | 
				
			||||||
registries:
 | 
					 | 
				
			||||||
  gradle-plugin-portal:
 | 
					 | 
				
			||||||
    type: maven-repository
 | 
					 | 
				
			||||||
    url: https://plugins.gradle.org/m2
 | 
					 | 
				
			||||||
    username: dummy # Required by dependabot
 | 
					 | 
				
			||||||
    password: dummy # Required by dependabot
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
updates:
 | 
					 | 
				
			||||||
  - package-ecosystem: "npm"
 | 
					 | 
				
			||||||
    directory: "/sources"
 | 
					 | 
				
			||||||
    schedule:
 | 
					 | 
				
			||||||
      interval: "weekly"
 | 
					 | 
				
			||||||
    groups:
 | 
					 | 
				
			||||||
      npm-dependencies:
 | 
					 | 
				
			||||||
        patterns:
 | 
					 | 
				
			||||||
        - "*"
 | 
					 | 
				
			||||||
      
 | 
					 | 
				
			||||||
  - package-ecosystem: "github-actions"
 | 
					 | 
				
			||||||
    # github-actions with directory: "/" only monitors .github/workflows
 | 
					 | 
				
			||||||
    # https://github.com/dependabot/dependabot-core/issues/6345
 | 
					 | 
				
			||||||
    directories:
 | 
					 | 
				
			||||||
      - "/"
 | 
					 | 
				
			||||||
      - "/.github/actions/build-dist"
 | 
					 | 
				
			||||||
      - "/.github/actions/init-integ-test"
 | 
					 | 
				
			||||||
    schedule:
 | 
					 | 
				
			||||||
      interval: "weekly"
 | 
					 | 
				
			||||||
    groups:
 | 
					 | 
				
			||||||
      github-actions:
 | 
					 | 
				
			||||||
        patterns:
 | 
					 | 
				
			||||||
          - "*"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - package-ecosystem: "gradle"
 | 
					 | 
				
			||||||
    directories:
 | 
					 | 
				
			||||||
      - ".github/workflow-samples/gradle-plugin"
 | 
					 | 
				
			||||||
      - ".github/workflow-samples/groovy-dsl"
 | 
					 | 
				
			||||||
      - ".github/workflow-samples/java-toolchain"
 | 
					 | 
				
			||||||
      - ".github/workflow-samples/kotlin-dsl"
 | 
					 | 
				
			||||||
      - ".github/workflow-samples/no-wrapper"
 | 
					 | 
				
			||||||
      - ".github/workflow-samples/no-wrapper-gradle-5"
 | 
					 | 
				
			||||||
      - "sources/test/init-scripts"
 | 
					 | 
				
			||||||
    registries:
 | 
					 | 
				
			||||||
      - gradle-plugin-portal
 | 
					 | 
				
			||||||
    schedule:
 | 
					 | 
				
			||||||
      interval: "weekly"
 | 
					 | 
				
			||||||
    groups:
 | 
					 | 
				
			||||||
      gradle:
 | 
					 | 
				
			||||||
        patterns:
 | 
					 | 
				
			||||||
          - "*"
 | 
					 | 
				
			||||||
@ -1,2 +0,0 @@
 | 
				
			|||||||
# This file was generated by the Gradle 'init' task.
 | 
					 | 
				
			||||||
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
 | 
					 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							@ -1,8 +0,0 @@
 | 
				
			|||||||
distributionBase=GRADLE_USER_HOME
 | 
					 | 
				
			||||||
distributionPath=wrapper/dists
 | 
					 | 
				
			||||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
 | 
					 | 
				
			||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
 | 
					 | 
				
			||||||
networkTimeout=10000
 | 
					 | 
				
			||||||
validateDistributionUrl=true
 | 
					 | 
				
			||||||
zipStoreBase=GRADLE_USER_HOME
 | 
					 | 
				
			||||||
zipStorePath=wrapper/dists
 | 
					 | 
				
			||||||
							
								
								
									
										248
									
								
								.github/workflow-samples/gradle-plugin/gradlew
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										248
									
								
								.github/workflow-samples/gradle-plugin/gradlew
									
									
									
									
										vendored
									
									
								
							@ -1,248 +0,0 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Copyright © 2015 the original authors.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
# you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
# You may obtain a copy of the License at
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
# distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
# limitations under the License.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Gradle start up script for POSIX generated by Gradle.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for running:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
 | 
					 | 
				
			||||||
#       noncompliant, but you have some other compliant shell such as ksh or
 | 
					 | 
				
			||||||
#       bash, then to run this script, type that shell name before the whole
 | 
					 | 
				
			||||||
#       command line, like:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#           ksh Gradle
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Busybox and similar reduced shells will NOT work, because this script
 | 
					 | 
				
			||||||
#       requires all of these POSIX shell features:
 | 
					 | 
				
			||||||
#         * functions;
 | 
					 | 
				
			||||||
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
 | 
					 | 
				
			||||||
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
 | 
					 | 
				
			||||||
#         * compound commands having a testable exit status, especially «case»;
 | 
					 | 
				
			||||||
#         * various built-in commands including «command», «set», and «ulimit».
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for patching:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (2) This script targets any POSIX shell, so it avoids extensions provided
 | 
					 | 
				
			||||||
#       by Bash, Ksh, etc; in particular arrays are avoided.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       The "traditional" practice of packing multiple parameters into a
 | 
					 | 
				
			||||||
#       space-separated string is a well documented source of bugs and security
 | 
					 | 
				
			||||||
#       problems, so this is (mostly) avoided, by progressively accumulating
 | 
					 | 
				
			||||||
#       options in "$@", and eventually passing that to Java.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
 | 
					 | 
				
			||||||
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
 | 
					 | 
				
			||||||
#       see the in-line comments for details.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       There are tweaks for specific operating systems such as AIX, CygWin,
 | 
					 | 
				
			||||||
#       Darwin, MinGW, and NonStop.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (3) This script is generated from the Groovy template
 | 
					 | 
				
			||||||
#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 | 
					 | 
				
			||||||
#       within the Gradle project.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       You can find Gradle at https://github.com/gradle/gradle/.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Attempt to set APP_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Resolve links: $0 may be a link
 | 
					 | 
				
			||||||
app_path=$0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Need this for daisy-chained symlinks.
 | 
					 | 
				
			||||||
while
 | 
					 | 
				
			||||||
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
 | 
					 | 
				
			||||||
    [ -h "$app_path" ]
 | 
					 | 
				
			||||||
do
 | 
					 | 
				
			||||||
    ls=$( ls -ld "$app_path" )
 | 
					 | 
				
			||||||
    link=${ls#*' -> '}
 | 
					 | 
				
			||||||
    case $link in             #(
 | 
					 | 
				
			||||||
      /*)   app_path=$link ;; #(
 | 
					 | 
				
			||||||
      *)    app_path=$APP_HOME$link ;;
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This is normally unused
 | 
					 | 
				
			||||||
# shellcheck disable=SC2034
 | 
					 | 
				
			||||||
APP_BASE_NAME=${0##*/}
 | 
					 | 
				
			||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
 | 
					 | 
				
			||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
 | 
					 | 
				
			||||||
MAX_FD=maximum
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
warn () {
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
die () {
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    exit 1
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# OS specific support (must be 'true' or 'false').
 | 
					 | 
				
			||||||
cygwin=false
 | 
					 | 
				
			||||||
msys=false
 | 
					 | 
				
			||||||
darwin=false
 | 
					 | 
				
			||||||
nonstop=false
 | 
					 | 
				
			||||||
case "$( uname )" in                #(
 | 
					 | 
				
			||||||
  CYGWIN* )         cygwin=true  ;; #(
 | 
					 | 
				
			||||||
  Darwin* )         darwin=true  ;; #(
 | 
					 | 
				
			||||||
  MSYS* | MINGW* )  msys=true    ;; #(
 | 
					 | 
				
			||||||
  NONSTOP* )        nonstop=true ;;
 | 
					 | 
				
			||||||
esac
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Determine the Java command to use to start the JVM.
 | 
					 | 
				
			||||||
if [ -n "$JAVA_HOME" ] ; then
 | 
					 | 
				
			||||||
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
 | 
					 | 
				
			||||||
        # IBM's JDK on AIX uses strange locations for the executables
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/jre/sh/java
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/bin/java
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ ! -x "$JAVACMD" ] ; then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
    JAVACMD=java
 | 
					 | 
				
			||||||
    if ! command -v java >/dev/null 2>&1
 | 
					 | 
				
			||||||
    then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Increase the maximum file descriptors if we can.
 | 
					 | 
				
			||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
 | 
					 | 
				
			||||||
    case $MAX_FD in #(
 | 
					 | 
				
			||||||
      max*)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        MAX_FD=$( ulimit -H -n ) ||
 | 
					 | 
				
			||||||
            warn "Could not query maximum file descriptor limit"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
    case $MAX_FD in  #(
 | 
					 | 
				
			||||||
      '' | soft) :;; #(
 | 
					 | 
				
			||||||
      *)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        ulimit -n "$MAX_FD" ||
 | 
					 | 
				
			||||||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command, stacking in reverse order:
 | 
					 | 
				
			||||||
#   * args from the command line
 | 
					 | 
				
			||||||
#   * the main class name
 | 
					 | 
				
			||||||
#   * -classpath
 | 
					 | 
				
			||||||
#   * -D...appname settings
 | 
					 | 
				
			||||||
#   * --module-path (only if needed)
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
 | 
					 | 
				
			||||||
if "$cygwin" || "$msys" ; then
 | 
					 | 
				
			||||||
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    JAVACMD=$( cygpath --unix "$JAVACMD" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
 | 
					 | 
				
			||||||
    for arg do
 | 
					 | 
				
			||||||
        if
 | 
					 | 
				
			||||||
            case $arg in                                #(
 | 
					 | 
				
			||||||
              -*)   false ;;                            # don't mess with options #(
 | 
					 | 
				
			||||||
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
 | 
					 | 
				
			||||||
                    [ -e "$t" ] ;;                      #(
 | 
					 | 
				
			||||||
              *)    false ;;
 | 
					 | 
				
			||||||
            esac
 | 
					 | 
				
			||||||
        then
 | 
					 | 
				
			||||||
            arg=$( cygpath --path --ignore --mixed "$arg" )
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        # Roll the args list around exactly as many times as the number of
 | 
					 | 
				
			||||||
        # args, so each arg winds up back in the position where it started, but
 | 
					 | 
				
			||||||
        # possibly modified.
 | 
					 | 
				
			||||||
        #
 | 
					 | 
				
			||||||
        # NB: a `for` loop captures its iteration list before it begins, so
 | 
					 | 
				
			||||||
        # changing the positional parameters here affects neither the number of
 | 
					 | 
				
			||||||
        # iterations, nor the values presented in `arg`.
 | 
					 | 
				
			||||||
        shift                   # remove old arg
 | 
					 | 
				
			||||||
        set -- "$@" "$arg"      # push replacement arg
 | 
					 | 
				
			||||||
    done
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command:
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
 | 
					 | 
				
			||||||
#     and any embedded shellness will be escaped.
 | 
					 | 
				
			||||||
#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
 | 
					 | 
				
			||||||
#     treated as '${Hostname}' itself on the command line.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -- \
 | 
					 | 
				
			||||||
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
 | 
					 | 
				
			||||||
        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
 | 
					 | 
				
			||||||
        "$@"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Stop when "xargs" is not available.
 | 
					 | 
				
			||||||
if ! command -v xargs >/dev/null 2>&1
 | 
					 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    die "xargs is not available"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use "xargs" to parse quoted args.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# In Bash we could simply go:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
 | 
					 | 
				
			||||||
#   set -- "${ARGS[@]}" "$@"
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
 | 
					 | 
				
			||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
 | 
					 | 
				
			||||||
# character that might be a shell metacharacter, then use eval to reverse
 | 
					 | 
				
			||||||
# that process (while maintaining the separation between arguments), and wrap
 | 
					 | 
				
			||||||
# the whole thing up as a single "set" statement.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# This will of course break if any of these variables contains a newline or
 | 
					 | 
				
			||||||
# an unmatched quote.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
eval "set -- $(
 | 
					 | 
				
			||||||
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
 | 
					 | 
				
			||||||
        xargs -n1 |
 | 
					 | 
				
			||||||
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
 | 
					 | 
				
			||||||
        tr '\n' ' '
 | 
					 | 
				
			||||||
    )" '"$@"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
exec "$JAVACMD" "$@"
 | 
					 | 
				
			||||||
@ -1,93 +0,0 @@
 | 
				
			|||||||
@rem
 | 
					 | 
				
			||||||
@rem Copyright 2015 the original author or authors.
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
@rem you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
@rem You may obtain a copy of the License at
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
@rem See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
@rem limitations under the License.
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@if "%DEBUG%"=="" @echo off
 | 
					 | 
				
			||||||
@rem ##########################################################################
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem  Gradle startup script for Windows
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem ##########################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Set local scope for the variables with windows NT shell
 | 
					 | 
				
			||||||
if "%OS%"=="Windows_NT" setlocal
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set DIRNAME=%~dp0
 | 
					 | 
				
			||||||
if "%DIRNAME%"=="" set DIRNAME=.
 | 
					 | 
				
			||||||
@rem This is normally unused
 | 
					 | 
				
			||||||
set APP_BASE_NAME=%~n0
 | 
					 | 
				
			||||||
set APP_HOME=%DIRNAME%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
 | 
					 | 
				
			||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Find java.exe
 | 
					 | 
				
			||||||
if defined JAVA_HOME goto findJavaFromJavaHome
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set JAVA_EXE=java.exe
 | 
					 | 
				
			||||||
%JAVA_EXE% -version >NUL 2>&1
 | 
					 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto execute
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
goto fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:findJavaFromJavaHome
 | 
					 | 
				
			||||||
set JAVA_HOME=%JAVA_HOME:"=%
 | 
					 | 
				
			||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if exist "%JAVA_EXE%" goto execute
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
goto fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:execute
 | 
					 | 
				
			||||||
@rem Setup the command line
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Execute Gradle
 | 
					 | 
				
			||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:end
 | 
					 | 
				
			||||||
@rem End local scope for the variables with windows NT shell
 | 
					 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto mainEnd
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:fail
 | 
					 | 
				
			||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 | 
					 | 
				
			||||||
rem the _cmd.exe /c_ return code!
 | 
					 | 
				
			||||||
set EXIT_CODE=%ERRORLEVEL%
 | 
					 | 
				
			||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
 | 
					 | 
				
			||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
 | 
					 | 
				
			||||||
exit /b %EXIT_CODE%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:mainEnd
 | 
					 | 
				
			||||||
if "%OS%"=="Windows_NT" endlocal
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:omega
 | 
					 | 
				
			||||||
@ -1,40 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    `java-gradle-plugin`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
repositories {
 | 
					 | 
				
			||||||
    mavenCentral()
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
testing {
 | 
					 | 
				
			||||||
    suites {
 | 
					 | 
				
			||||||
        val test by getting(JvmTestSuite::class) {
 | 
					 | 
				
			||||||
            useJUnitJupiter()
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        val functionalTest by registering(JvmTestSuite::class) {
 | 
					 | 
				
			||||||
            dependencies {
 | 
					 | 
				
			||||||
                implementation(project())
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            targets {
 | 
					 | 
				
			||||||
                all {
 | 
					 | 
				
			||||||
                    testTask.configure { shouldRunAfter(test) } 
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
gradlePlugin {
 | 
					 | 
				
			||||||
    val greeting by plugins.creating {
 | 
					 | 
				
			||||||
        id = "org.example.greeting"
 | 
					 | 
				
			||||||
        implementationClass = "org.example.GradlePluginPlugin"
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
gradlePlugin.testSourceSets.add(sourceSets["functionalTest"])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
tasks.named<Task>("check") {
 | 
					 | 
				
			||||||
    dependsOn(testing.suites.named("functionalTest"))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,56 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * This source file was generated by the Gradle 'init' task
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
package org.example;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.io.File;
 | 
					 | 
				
			||||||
import java.io.IOException;
 | 
					 | 
				
			||||||
import java.io.Writer;
 | 
					 | 
				
			||||||
import java.io.FileWriter;
 | 
					 | 
				
			||||||
import java.nio.file.Files;
 | 
					 | 
				
			||||||
import org.gradle.testkit.runner.GradleRunner;
 | 
					 | 
				
			||||||
import org.gradle.testkit.runner.BuildResult;
 | 
					 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					 | 
				
			||||||
import org.junit.jupiter.api.io.TempDir;
 | 
					 | 
				
			||||||
import static org.junit.jupiter.api.Assertions.*;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * A simple functional test for the 'org.example.greeting' plugin.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
class GradlePluginPluginFunctionalTest {
 | 
					 | 
				
			||||||
    @TempDir
 | 
					 | 
				
			||||||
    File projectDir;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private File getBuildFile() {
 | 
					 | 
				
			||||||
        return new File(projectDir, "build.gradle");
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private File getSettingsFile() {
 | 
					 | 
				
			||||||
        return new File(projectDir, "settings.gradle");
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Test void canRunTask() throws IOException {
 | 
					 | 
				
			||||||
        writeString(getSettingsFile(), "");
 | 
					 | 
				
			||||||
        writeString(getBuildFile(),
 | 
					 | 
				
			||||||
            "plugins {" +
 | 
					 | 
				
			||||||
            "  id('org.example.greeting')" +
 | 
					 | 
				
			||||||
            "}");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // Run the build
 | 
					 | 
				
			||||||
        GradleRunner runner = GradleRunner.create();
 | 
					 | 
				
			||||||
        runner.forwardOutput();
 | 
					 | 
				
			||||||
        runner.withPluginClasspath();
 | 
					 | 
				
			||||||
        runner.withArguments("greeting");
 | 
					 | 
				
			||||||
        runner.withProjectDir(projectDir);
 | 
					 | 
				
			||||||
        BuildResult result = runner.build();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // Verify the result
 | 
					 | 
				
			||||||
        assertTrue(result.getOutput().contains("Hello from plugin 'org.example.greeting'"));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private void writeString(File file, String string) throws IOException {
 | 
					 | 
				
			||||||
        try (Writer writer = new FileWriter(file)) {
 | 
					 | 
				
			||||||
            writer.write(string);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,19 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * This source file was generated by the Gradle 'init' task
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
package org.example;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import org.gradle.api.Project;
 | 
					 | 
				
			||||||
import org.gradle.api.Plugin;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * A simple 'hello world' plugin.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public class GradlePluginPlugin implements Plugin<Project> {
 | 
					 | 
				
			||||||
    public void apply(Project project) {
 | 
					 | 
				
			||||||
        // Register a task
 | 
					 | 
				
			||||||
        project.getTasks().register("greeting", task -> {
 | 
					 | 
				
			||||||
            task.doLast(s -> System.out.println("Hello from plugin 'org.example.greeting'"));
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,23 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * This source file was generated by the Gradle 'init' task
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
package org.example;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import org.gradle.testfixtures.ProjectBuilder;
 | 
					 | 
				
			||||||
import org.gradle.api.Project;
 | 
					 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					 | 
				
			||||||
import static org.junit.jupiter.api.Assertions.*;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * A simple unit test for the 'org.example.greeting' plugin.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
class GradlePluginPluginTest {
 | 
					 | 
				
			||||||
    @Test void pluginRegistersATask() {
 | 
					 | 
				
			||||||
        // Create a test project and apply the plugin
 | 
					 | 
				
			||||||
        Project project = ProjectBuilder.builder().build();
 | 
					 | 
				
			||||||
        project.getPlugins().apply("org.example.greeting");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // Verify the result
 | 
					 | 
				
			||||||
        assertNotNull(project.getTasks().findByName("greeting"));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,2 +0,0 @@
 | 
				
			|||||||
rootProject.name = "gradle-plugin-2"
 | 
					 | 
				
			||||||
include("plugin")
 | 
					 | 
				
			||||||
							
								
								
									
										26
									
								
								.github/workflow-samples/groovy-dsl/build.gradle
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								.github/workflow-samples/groovy-dsl/build.gradle
									
									
									
									
										vendored
									
									
								
							@ -1,26 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    id 'java'
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
repositories {
 | 
					 | 
				
			||||||
    mavenCentral()
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
testing {
 | 
					 | 
				
			||||||
    suites {
 | 
					 | 
				
			||||||
        test {
 | 
					 | 
				
			||||||
            useJUnit()
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
tasks.named("test").configure {
 | 
					 | 
				
			||||||
    // Write marker file so we can detect if task was configured
 | 
					 | 
				
			||||||
    file("task-configured.txt").text = "true"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    doLast {
 | 
					 | 
				
			||||||
        if (System.properties.verifyCachedBuild) {
 | 
					 | 
				
			||||||
            throw new RuntimeException("Build was not cached: unexpected execution of test task")
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							@ -1,8 +0,0 @@
 | 
				
			|||||||
distributionBase=GRADLE_USER_HOME
 | 
					 | 
				
			||||||
distributionPath=wrapper/dists
 | 
					 | 
				
			||||||
distributionSha256Sum=df67a32e86e3276d011735facb1535f64d0d88df84fa87521e90becc2d735444
 | 
					 | 
				
			||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
 | 
					 | 
				
			||||||
networkTimeout=10000
 | 
					 | 
				
			||||||
validateDistributionUrl=true
 | 
					 | 
				
			||||||
zipStoreBase=GRADLE_USER_HOME
 | 
					 | 
				
			||||||
zipStorePath=wrapper/dists
 | 
					 | 
				
			||||||
							
								
								
									
										248
									
								
								.github/workflow-samples/groovy-dsl/gradlew
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										248
									
								
								.github/workflow-samples/groovy-dsl/gradlew
									
									
									
									
										vendored
									
									
								
							@ -1,248 +0,0 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Copyright © 2015 the original authors.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
# you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
# You may obtain a copy of the License at
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
# distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
# limitations under the License.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Gradle start up script for POSIX generated by Gradle.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for running:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
 | 
					 | 
				
			||||||
#       noncompliant, but you have some other compliant shell such as ksh or
 | 
					 | 
				
			||||||
#       bash, then to run this script, type that shell name before the whole
 | 
					 | 
				
			||||||
#       command line, like:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#           ksh Gradle
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Busybox and similar reduced shells will NOT work, because this script
 | 
					 | 
				
			||||||
#       requires all of these POSIX shell features:
 | 
					 | 
				
			||||||
#         * functions;
 | 
					 | 
				
			||||||
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
 | 
					 | 
				
			||||||
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
 | 
					 | 
				
			||||||
#         * compound commands having a testable exit status, especially «case»;
 | 
					 | 
				
			||||||
#         * various built-in commands including «command», «set», and «ulimit».
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for patching:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (2) This script targets any POSIX shell, so it avoids extensions provided
 | 
					 | 
				
			||||||
#       by Bash, Ksh, etc; in particular arrays are avoided.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       The "traditional" practice of packing multiple parameters into a
 | 
					 | 
				
			||||||
#       space-separated string is a well documented source of bugs and security
 | 
					 | 
				
			||||||
#       problems, so this is (mostly) avoided, by progressively accumulating
 | 
					 | 
				
			||||||
#       options in "$@", and eventually passing that to Java.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
 | 
					 | 
				
			||||||
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
 | 
					 | 
				
			||||||
#       see the in-line comments for details.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       There are tweaks for specific operating systems such as AIX, CygWin,
 | 
					 | 
				
			||||||
#       Darwin, MinGW, and NonStop.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (3) This script is generated from the Groovy template
 | 
					 | 
				
			||||||
#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 | 
					 | 
				
			||||||
#       within the Gradle project.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       You can find Gradle at https://github.com/gradle/gradle/.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Attempt to set APP_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Resolve links: $0 may be a link
 | 
					 | 
				
			||||||
app_path=$0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Need this for daisy-chained symlinks.
 | 
					 | 
				
			||||||
while
 | 
					 | 
				
			||||||
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
 | 
					 | 
				
			||||||
    [ -h "$app_path" ]
 | 
					 | 
				
			||||||
do
 | 
					 | 
				
			||||||
    ls=$( ls -ld "$app_path" )
 | 
					 | 
				
			||||||
    link=${ls#*' -> '}
 | 
					 | 
				
			||||||
    case $link in             #(
 | 
					 | 
				
			||||||
      /*)   app_path=$link ;; #(
 | 
					 | 
				
			||||||
      *)    app_path=$APP_HOME$link ;;
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This is normally unused
 | 
					 | 
				
			||||||
# shellcheck disable=SC2034
 | 
					 | 
				
			||||||
APP_BASE_NAME=${0##*/}
 | 
					 | 
				
			||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
 | 
					 | 
				
			||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
 | 
					 | 
				
			||||||
MAX_FD=maximum
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
warn () {
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
die () {
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    exit 1
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# OS specific support (must be 'true' or 'false').
 | 
					 | 
				
			||||||
cygwin=false
 | 
					 | 
				
			||||||
msys=false
 | 
					 | 
				
			||||||
darwin=false
 | 
					 | 
				
			||||||
nonstop=false
 | 
					 | 
				
			||||||
case "$( uname )" in                #(
 | 
					 | 
				
			||||||
  CYGWIN* )         cygwin=true  ;; #(
 | 
					 | 
				
			||||||
  Darwin* )         darwin=true  ;; #(
 | 
					 | 
				
			||||||
  MSYS* | MINGW* )  msys=true    ;; #(
 | 
					 | 
				
			||||||
  NONSTOP* )        nonstop=true ;;
 | 
					 | 
				
			||||||
esac
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Determine the Java command to use to start the JVM.
 | 
					 | 
				
			||||||
if [ -n "$JAVA_HOME" ] ; then
 | 
					 | 
				
			||||||
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
 | 
					 | 
				
			||||||
        # IBM's JDK on AIX uses strange locations for the executables
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/jre/sh/java
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/bin/java
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ ! -x "$JAVACMD" ] ; then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
    JAVACMD=java
 | 
					 | 
				
			||||||
    if ! command -v java >/dev/null 2>&1
 | 
					 | 
				
			||||||
    then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Increase the maximum file descriptors if we can.
 | 
					 | 
				
			||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
 | 
					 | 
				
			||||||
    case $MAX_FD in #(
 | 
					 | 
				
			||||||
      max*)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        MAX_FD=$( ulimit -H -n ) ||
 | 
					 | 
				
			||||||
            warn "Could not query maximum file descriptor limit"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
    case $MAX_FD in  #(
 | 
					 | 
				
			||||||
      '' | soft) :;; #(
 | 
					 | 
				
			||||||
      *)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        ulimit -n "$MAX_FD" ||
 | 
					 | 
				
			||||||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command, stacking in reverse order:
 | 
					 | 
				
			||||||
#   * args from the command line
 | 
					 | 
				
			||||||
#   * the main class name
 | 
					 | 
				
			||||||
#   * -classpath
 | 
					 | 
				
			||||||
#   * -D...appname settings
 | 
					 | 
				
			||||||
#   * --module-path (only if needed)
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
 | 
					 | 
				
			||||||
if "$cygwin" || "$msys" ; then
 | 
					 | 
				
			||||||
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    JAVACMD=$( cygpath --unix "$JAVACMD" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
 | 
					 | 
				
			||||||
    for arg do
 | 
					 | 
				
			||||||
        if
 | 
					 | 
				
			||||||
            case $arg in                                #(
 | 
					 | 
				
			||||||
              -*)   false ;;                            # don't mess with options #(
 | 
					 | 
				
			||||||
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
 | 
					 | 
				
			||||||
                    [ -e "$t" ] ;;                      #(
 | 
					 | 
				
			||||||
              *)    false ;;
 | 
					 | 
				
			||||||
            esac
 | 
					 | 
				
			||||||
        then
 | 
					 | 
				
			||||||
            arg=$( cygpath --path --ignore --mixed "$arg" )
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        # Roll the args list around exactly as many times as the number of
 | 
					 | 
				
			||||||
        # args, so each arg winds up back in the position where it started, but
 | 
					 | 
				
			||||||
        # possibly modified.
 | 
					 | 
				
			||||||
        #
 | 
					 | 
				
			||||||
        # NB: a `for` loop captures its iteration list before it begins, so
 | 
					 | 
				
			||||||
        # changing the positional parameters here affects neither the number of
 | 
					 | 
				
			||||||
        # iterations, nor the values presented in `arg`.
 | 
					 | 
				
			||||||
        shift                   # remove old arg
 | 
					 | 
				
			||||||
        set -- "$@" "$arg"      # push replacement arg
 | 
					 | 
				
			||||||
    done
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command:
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
 | 
					 | 
				
			||||||
#     and any embedded shellness will be escaped.
 | 
					 | 
				
			||||||
#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
 | 
					 | 
				
			||||||
#     treated as '${Hostname}' itself on the command line.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -- \
 | 
					 | 
				
			||||||
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
 | 
					 | 
				
			||||||
        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
 | 
					 | 
				
			||||||
        "$@"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Stop when "xargs" is not available.
 | 
					 | 
				
			||||||
if ! command -v xargs >/dev/null 2>&1
 | 
					 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    die "xargs is not available"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use "xargs" to parse quoted args.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# In Bash we could simply go:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
 | 
					 | 
				
			||||||
#   set -- "${ARGS[@]}" "$@"
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
 | 
					 | 
				
			||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
 | 
					 | 
				
			||||||
# character that might be a shell metacharacter, then use eval to reverse
 | 
					 | 
				
			||||||
# that process (while maintaining the separation between arguments), and wrap
 | 
					 | 
				
			||||||
# the whole thing up as a single "set" statement.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# This will of course break if any of these variables contains a newline or
 | 
					 | 
				
			||||||
# an unmatched quote.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
eval "set -- $(
 | 
					 | 
				
			||||||
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
 | 
					 | 
				
			||||||
        xargs -n1 |
 | 
					 | 
				
			||||||
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
 | 
					 | 
				
			||||||
        tr '\n' ' '
 | 
					 | 
				
			||||||
    )" '"$@"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
exec "$JAVACMD" "$@"
 | 
					 | 
				
			||||||
@ -1,13 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    id "com.gradle.develocity" version "4.2.2"
 | 
					 | 
				
			||||||
    id "com.gradle.common-custom-user-data-gradle-plugin" version "2.4.0"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
develocity {
 | 
					 | 
				
			||||||
    buildScan {
 | 
					 | 
				
			||||||
        termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
 | 
					 | 
				
			||||||
        termsOfUseAgree = "yes"
 | 
					 | 
				
			||||||
        uploadInBackground = false
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
rootProject.name = 'groovy-dsl'
 | 
					 | 
				
			||||||
@ -1,21 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    java
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
java {
 | 
					 | 
				
			||||||
    toolchain {
 | 
					 | 
				
			||||||
        languageVersion = JavaLanguageVersion.of(16)
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
repositories {
 | 
					 | 
				
			||||||
    mavenCentral()
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
testing {
 | 
					 | 
				
			||||||
    suites {
 | 
					 | 
				
			||||||
        val test by getting(JvmTestSuite::class) {
 | 
					 | 
				
			||||||
            useJUnit()
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										248
									
								
								.github/workflow-samples/java-toolchain/gradlew
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										248
									
								
								.github/workflow-samples/java-toolchain/gradlew
									
									
									
									
										vendored
									
									
								
							@ -1,248 +0,0 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Copyright © 2015 the original authors.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
# you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
# You may obtain a copy of the License at
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
# distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
# limitations under the License.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Gradle start up script for POSIX generated by Gradle.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for running:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
 | 
					 | 
				
			||||||
#       noncompliant, but you have some other compliant shell such as ksh or
 | 
					 | 
				
			||||||
#       bash, then to run this script, type that shell name before the whole
 | 
					 | 
				
			||||||
#       command line, like:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#           ksh Gradle
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Busybox and similar reduced shells will NOT work, because this script
 | 
					 | 
				
			||||||
#       requires all of these POSIX shell features:
 | 
					 | 
				
			||||||
#         * functions;
 | 
					 | 
				
			||||||
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
 | 
					 | 
				
			||||||
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
 | 
					 | 
				
			||||||
#         * compound commands having a testable exit status, especially «case»;
 | 
					 | 
				
			||||||
#         * various built-in commands including «command», «set», and «ulimit».
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for patching:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (2) This script targets any POSIX shell, so it avoids extensions provided
 | 
					 | 
				
			||||||
#       by Bash, Ksh, etc; in particular arrays are avoided.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       The "traditional" practice of packing multiple parameters into a
 | 
					 | 
				
			||||||
#       space-separated string is a well documented source of bugs and security
 | 
					 | 
				
			||||||
#       problems, so this is (mostly) avoided, by progressively accumulating
 | 
					 | 
				
			||||||
#       options in "$@", and eventually passing that to Java.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
 | 
					 | 
				
			||||||
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
 | 
					 | 
				
			||||||
#       see the in-line comments for details.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       There are tweaks for specific operating systems such as AIX, CygWin,
 | 
					 | 
				
			||||||
#       Darwin, MinGW, and NonStop.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (3) This script is generated from the Groovy template
 | 
					 | 
				
			||||||
#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 | 
					 | 
				
			||||||
#       within the Gradle project.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       You can find Gradle at https://github.com/gradle/gradle/.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Attempt to set APP_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Resolve links: $0 may be a link
 | 
					 | 
				
			||||||
app_path=$0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Need this for daisy-chained symlinks.
 | 
					 | 
				
			||||||
while
 | 
					 | 
				
			||||||
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
 | 
					 | 
				
			||||||
    [ -h "$app_path" ]
 | 
					 | 
				
			||||||
do
 | 
					 | 
				
			||||||
    ls=$( ls -ld "$app_path" )
 | 
					 | 
				
			||||||
    link=${ls#*' -> '}
 | 
					 | 
				
			||||||
    case $link in             #(
 | 
					 | 
				
			||||||
      /*)   app_path=$link ;; #(
 | 
					 | 
				
			||||||
      *)    app_path=$APP_HOME$link ;;
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This is normally unused
 | 
					 | 
				
			||||||
# shellcheck disable=SC2034
 | 
					 | 
				
			||||||
APP_BASE_NAME=${0##*/}
 | 
					 | 
				
			||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
 | 
					 | 
				
			||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
 | 
					 | 
				
			||||||
MAX_FD=maximum
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
warn () {
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
die () {
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    exit 1
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# OS specific support (must be 'true' or 'false').
 | 
					 | 
				
			||||||
cygwin=false
 | 
					 | 
				
			||||||
msys=false
 | 
					 | 
				
			||||||
darwin=false
 | 
					 | 
				
			||||||
nonstop=false
 | 
					 | 
				
			||||||
case "$( uname )" in                #(
 | 
					 | 
				
			||||||
  CYGWIN* )         cygwin=true  ;; #(
 | 
					 | 
				
			||||||
  Darwin* )         darwin=true  ;; #(
 | 
					 | 
				
			||||||
  MSYS* | MINGW* )  msys=true    ;; #(
 | 
					 | 
				
			||||||
  NONSTOP* )        nonstop=true ;;
 | 
					 | 
				
			||||||
esac
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Determine the Java command to use to start the JVM.
 | 
					 | 
				
			||||||
if [ -n "$JAVA_HOME" ] ; then
 | 
					 | 
				
			||||||
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
 | 
					 | 
				
			||||||
        # IBM's JDK on AIX uses strange locations for the executables
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/jre/sh/java
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/bin/java
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ ! -x "$JAVACMD" ] ; then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
    JAVACMD=java
 | 
					 | 
				
			||||||
    if ! command -v java >/dev/null 2>&1
 | 
					 | 
				
			||||||
    then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Increase the maximum file descriptors if we can.
 | 
					 | 
				
			||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
 | 
					 | 
				
			||||||
    case $MAX_FD in #(
 | 
					 | 
				
			||||||
      max*)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        MAX_FD=$( ulimit -H -n ) ||
 | 
					 | 
				
			||||||
            warn "Could not query maximum file descriptor limit"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
    case $MAX_FD in  #(
 | 
					 | 
				
			||||||
      '' | soft) :;; #(
 | 
					 | 
				
			||||||
      *)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        ulimit -n "$MAX_FD" ||
 | 
					 | 
				
			||||||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command, stacking in reverse order:
 | 
					 | 
				
			||||||
#   * args from the command line
 | 
					 | 
				
			||||||
#   * the main class name
 | 
					 | 
				
			||||||
#   * -classpath
 | 
					 | 
				
			||||||
#   * -D...appname settings
 | 
					 | 
				
			||||||
#   * --module-path (only if needed)
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
 | 
					 | 
				
			||||||
if "$cygwin" || "$msys" ; then
 | 
					 | 
				
			||||||
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    JAVACMD=$( cygpath --unix "$JAVACMD" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
 | 
					 | 
				
			||||||
    for arg do
 | 
					 | 
				
			||||||
        if
 | 
					 | 
				
			||||||
            case $arg in                                #(
 | 
					 | 
				
			||||||
              -*)   false ;;                            # don't mess with options #(
 | 
					 | 
				
			||||||
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
 | 
					 | 
				
			||||||
                    [ -e "$t" ] ;;                      #(
 | 
					 | 
				
			||||||
              *)    false ;;
 | 
					 | 
				
			||||||
            esac
 | 
					 | 
				
			||||||
        then
 | 
					 | 
				
			||||||
            arg=$( cygpath --path --ignore --mixed "$arg" )
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        # Roll the args list around exactly as many times as the number of
 | 
					 | 
				
			||||||
        # args, so each arg winds up back in the position where it started, but
 | 
					 | 
				
			||||||
        # possibly modified.
 | 
					 | 
				
			||||||
        #
 | 
					 | 
				
			||||||
        # NB: a `for` loop captures its iteration list before it begins, so
 | 
					 | 
				
			||||||
        # changing the positional parameters here affects neither the number of
 | 
					 | 
				
			||||||
        # iterations, nor the values presented in `arg`.
 | 
					 | 
				
			||||||
        shift                   # remove old arg
 | 
					 | 
				
			||||||
        set -- "$@" "$arg"      # push replacement arg
 | 
					 | 
				
			||||||
    done
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command:
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
 | 
					 | 
				
			||||||
#     and any embedded shellness will be escaped.
 | 
					 | 
				
			||||||
#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
 | 
					 | 
				
			||||||
#     treated as '${Hostname}' itself on the command line.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -- \
 | 
					 | 
				
			||||||
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
 | 
					 | 
				
			||||||
        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
 | 
					 | 
				
			||||||
        "$@"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Stop when "xargs" is not available.
 | 
					 | 
				
			||||||
if ! command -v xargs >/dev/null 2>&1
 | 
					 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    die "xargs is not available"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use "xargs" to parse quoted args.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# In Bash we could simply go:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
 | 
					 | 
				
			||||||
#   set -- "${ARGS[@]}" "$@"
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
 | 
					 | 
				
			||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
 | 
					 | 
				
			||||||
# character that might be a shell metacharacter, then use eval to reverse
 | 
					 | 
				
			||||||
# that process (while maintaining the separation between arguments), and wrap
 | 
					 | 
				
			||||||
# the whole thing up as a single "set" statement.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# This will of course break if any of these variables contains a newline or
 | 
					 | 
				
			||||||
# an unmatched quote.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
eval "set -- $(
 | 
					 | 
				
			||||||
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
 | 
					 | 
				
			||||||
        xargs -n1 |
 | 
					 | 
				
			||||||
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
 | 
					 | 
				
			||||||
        tr '\n' ' '
 | 
					 | 
				
			||||||
    )" '"$@"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
exec "$JAVACMD" "$@"
 | 
					 | 
				
			||||||
@ -1,93 +0,0 @@
 | 
				
			|||||||
@rem
 | 
					 | 
				
			||||||
@rem Copyright 2015 the original author or authors.
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
@rem you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
@rem You may obtain a copy of the License at
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
@rem See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
@rem limitations under the License.
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@if "%DEBUG%"=="" @echo off
 | 
					 | 
				
			||||||
@rem ##########################################################################
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem  Gradle startup script for Windows
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem ##########################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Set local scope for the variables with windows NT shell
 | 
					 | 
				
			||||||
if "%OS%"=="Windows_NT" setlocal
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set DIRNAME=%~dp0
 | 
					 | 
				
			||||||
if "%DIRNAME%"=="" set DIRNAME=.
 | 
					 | 
				
			||||||
@rem This is normally unused
 | 
					 | 
				
			||||||
set APP_BASE_NAME=%~n0
 | 
					 | 
				
			||||||
set APP_HOME=%DIRNAME%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
 | 
					 | 
				
			||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Find java.exe
 | 
					 | 
				
			||||||
if defined JAVA_HOME goto findJavaFromJavaHome
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set JAVA_EXE=java.exe
 | 
					 | 
				
			||||||
%JAVA_EXE% -version >NUL 2>&1
 | 
					 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto execute
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
goto fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:findJavaFromJavaHome
 | 
					 | 
				
			||||||
set JAVA_HOME=%JAVA_HOME:"=%
 | 
					 | 
				
			||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if exist "%JAVA_EXE%" goto execute
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
goto fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:execute
 | 
					 | 
				
			||||||
@rem Setup the command line
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Execute Gradle
 | 
					 | 
				
			||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:end
 | 
					 | 
				
			||||||
@rem End local scope for the variables with windows NT shell
 | 
					 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto mainEnd
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:fail
 | 
					 | 
				
			||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 | 
					 | 
				
			||||||
rem the _cmd.exe /c_ return code!
 | 
					 | 
				
			||||||
set EXIT_CODE=%ERRORLEVEL%
 | 
					 | 
				
			||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
 | 
					 | 
				
			||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
 | 
					 | 
				
			||||||
exit /b %EXIT_CODE%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:mainEnd
 | 
					 | 
				
			||||||
if "%OS%"=="Windows_NT" endlocal
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:omega
 | 
					 | 
				
			||||||
@ -1,6 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    // Apply the foojay-resolver plugin to allow automatic download of JDKs
 | 
					 | 
				
			||||||
    id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
rootProject.name = "java-toolchains"
 | 
					 | 
				
			||||||
@ -1,31 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    `java-library`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
repositories {
 | 
					 | 
				
			||||||
    mavenCentral()
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
dependencies {
 | 
					 | 
				
			||||||
    api("org.apache.commons:commons-math3:3.6.1")
 | 
					 | 
				
			||||||
    implementation("com.google.guava:guava:33.5.0-jre")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
testing {
 | 
					 | 
				
			||||||
    suites { 
 | 
					 | 
				
			||||||
       val test by getting(JvmTestSuite::class) { 
 | 
					 | 
				
			||||||
            useJUnitJupiter() 
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
tasks.named("test").configure {
 | 
					 | 
				
			||||||
    // Write marker file so we can detect if task was configured
 | 
					 | 
				
			||||||
    file("task-configured.txt").writeText("true")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    doLast {
 | 
					 | 
				
			||||||
        if (System.getProperties().containsKey("verifyCachedBuild")) {
 | 
					 | 
				
			||||||
            throw RuntimeException("Build was not cached: unexpected execution of test task")
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
org.gradle.caching=true
 | 
					 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										248
									
								
								.github/workflow-samples/kotlin-dsl/gradlew
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										248
									
								
								.github/workflow-samples/kotlin-dsl/gradlew
									
									
									
									
										vendored
									
									
								
							@ -1,248 +0,0 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Copyright © 2015 the original authors.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
# you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
# You may obtain a copy of the License at
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
# distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
# limitations under the License.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Gradle start up script for POSIX generated by Gradle.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for running:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
 | 
					 | 
				
			||||||
#       noncompliant, but you have some other compliant shell such as ksh or
 | 
					 | 
				
			||||||
#       bash, then to run this script, type that shell name before the whole
 | 
					 | 
				
			||||||
#       command line, like:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#           ksh Gradle
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Busybox and similar reduced shells will NOT work, because this script
 | 
					 | 
				
			||||||
#       requires all of these POSIX shell features:
 | 
					 | 
				
			||||||
#         * functions;
 | 
					 | 
				
			||||||
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
 | 
					 | 
				
			||||||
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
 | 
					 | 
				
			||||||
#         * compound commands having a testable exit status, especially «case»;
 | 
					 | 
				
			||||||
#         * various built-in commands including «command», «set», and «ulimit».
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for patching:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (2) This script targets any POSIX shell, so it avoids extensions provided
 | 
					 | 
				
			||||||
#       by Bash, Ksh, etc; in particular arrays are avoided.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       The "traditional" practice of packing multiple parameters into a
 | 
					 | 
				
			||||||
#       space-separated string is a well documented source of bugs and security
 | 
					 | 
				
			||||||
#       problems, so this is (mostly) avoided, by progressively accumulating
 | 
					 | 
				
			||||||
#       options in "$@", and eventually passing that to Java.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
 | 
					 | 
				
			||||||
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
 | 
					 | 
				
			||||||
#       see the in-line comments for details.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       There are tweaks for specific operating systems such as AIX, CygWin,
 | 
					 | 
				
			||||||
#       Darwin, MinGW, and NonStop.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (3) This script is generated from the Groovy template
 | 
					 | 
				
			||||||
#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 | 
					 | 
				
			||||||
#       within the Gradle project.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       You can find Gradle at https://github.com/gradle/gradle/.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Attempt to set APP_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Resolve links: $0 may be a link
 | 
					 | 
				
			||||||
app_path=$0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Need this for daisy-chained symlinks.
 | 
					 | 
				
			||||||
while
 | 
					 | 
				
			||||||
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
 | 
					 | 
				
			||||||
    [ -h "$app_path" ]
 | 
					 | 
				
			||||||
do
 | 
					 | 
				
			||||||
    ls=$( ls -ld "$app_path" )
 | 
					 | 
				
			||||||
    link=${ls#*' -> '}
 | 
					 | 
				
			||||||
    case $link in             #(
 | 
					 | 
				
			||||||
      /*)   app_path=$link ;; #(
 | 
					 | 
				
			||||||
      *)    app_path=$APP_HOME$link ;;
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This is normally unused
 | 
					 | 
				
			||||||
# shellcheck disable=SC2034
 | 
					 | 
				
			||||||
APP_BASE_NAME=${0##*/}
 | 
					 | 
				
			||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
 | 
					 | 
				
			||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
 | 
					 | 
				
			||||||
MAX_FD=maximum
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
warn () {
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
die () {
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    exit 1
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# OS specific support (must be 'true' or 'false').
 | 
					 | 
				
			||||||
cygwin=false
 | 
					 | 
				
			||||||
msys=false
 | 
					 | 
				
			||||||
darwin=false
 | 
					 | 
				
			||||||
nonstop=false
 | 
					 | 
				
			||||||
case "$( uname )" in                #(
 | 
					 | 
				
			||||||
  CYGWIN* )         cygwin=true  ;; #(
 | 
					 | 
				
			||||||
  Darwin* )         darwin=true  ;; #(
 | 
					 | 
				
			||||||
  MSYS* | MINGW* )  msys=true    ;; #(
 | 
					 | 
				
			||||||
  NONSTOP* )        nonstop=true ;;
 | 
					 | 
				
			||||||
esac
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Determine the Java command to use to start the JVM.
 | 
					 | 
				
			||||||
if [ -n "$JAVA_HOME" ] ; then
 | 
					 | 
				
			||||||
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
 | 
					 | 
				
			||||||
        # IBM's JDK on AIX uses strange locations for the executables
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/jre/sh/java
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/bin/java
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ ! -x "$JAVACMD" ] ; then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
    JAVACMD=java
 | 
					 | 
				
			||||||
    if ! command -v java >/dev/null 2>&1
 | 
					 | 
				
			||||||
    then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Increase the maximum file descriptors if we can.
 | 
					 | 
				
			||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
 | 
					 | 
				
			||||||
    case $MAX_FD in #(
 | 
					 | 
				
			||||||
      max*)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        MAX_FD=$( ulimit -H -n ) ||
 | 
					 | 
				
			||||||
            warn "Could not query maximum file descriptor limit"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
    case $MAX_FD in  #(
 | 
					 | 
				
			||||||
      '' | soft) :;; #(
 | 
					 | 
				
			||||||
      *)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        ulimit -n "$MAX_FD" ||
 | 
					 | 
				
			||||||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command, stacking in reverse order:
 | 
					 | 
				
			||||||
#   * args from the command line
 | 
					 | 
				
			||||||
#   * the main class name
 | 
					 | 
				
			||||||
#   * -classpath
 | 
					 | 
				
			||||||
#   * -D...appname settings
 | 
					 | 
				
			||||||
#   * --module-path (only if needed)
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
 | 
					 | 
				
			||||||
if "$cygwin" || "$msys" ; then
 | 
					 | 
				
			||||||
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    JAVACMD=$( cygpath --unix "$JAVACMD" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
 | 
					 | 
				
			||||||
    for arg do
 | 
					 | 
				
			||||||
        if
 | 
					 | 
				
			||||||
            case $arg in                                #(
 | 
					 | 
				
			||||||
              -*)   false ;;                            # don't mess with options #(
 | 
					 | 
				
			||||||
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
 | 
					 | 
				
			||||||
                    [ -e "$t" ] ;;                      #(
 | 
					 | 
				
			||||||
              *)    false ;;
 | 
					 | 
				
			||||||
            esac
 | 
					 | 
				
			||||||
        then
 | 
					 | 
				
			||||||
            arg=$( cygpath --path --ignore --mixed "$arg" )
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        # Roll the args list around exactly as many times as the number of
 | 
					 | 
				
			||||||
        # args, so each arg winds up back in the position where it started, but
 | 
					 | 
				
			||||||
        # possibly modified.
 | 
					 | 
				
			||||||
        #
 | 
					 | 
				
			||||||
        # NB: a `for` loop captures its iteration list before it begins, so
 | 
					 | 
				
			||||||
        # changing the positional parameters here affects neither the number of
 | 
					 | 
				
			||||||
        # iterations, nor the values presented in `arg`.
 | 
					 | 
				
			||||||
        shift                   # remove old arg
 | 
					 | 
				
			||||||
        set -- "$@" "$arg"      # push replacement arg
 | 
					 | 
				
			||||||
    done
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command:
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
 | 
					 | 
				
			||||||
#     and any embedded shellness will be escaped.
 | 
					 | 
				
			||||||
#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
 | 
					 | 
				
			||||||
#     treated as '${Hostname}' itself on the command line.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -- \
 | 
					 | 
				
			||||||
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
 | 
					 | 
				
			||||||
        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
 | 
					 | 
				
			||||||
        "$@"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Stop when "xargs" is not available.
 | 
					 | 
				
			||||||
if ! command -v xargs >/dev/null 2>&1
 | 
					 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    die "xargs is not available"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use "xargs" to parse quoted args.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# In Bash we could simply go:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
 | 
					 | 
				
			||||||
#   set -- "${ARGS[@]}" "$@"
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
 | 
					 | 
				
			||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
 | 
					 | 
				
			||||||
# character that might be a shell metacharacter, then use eval to reverse
 | 
					 | 
				
			||||||
# that process (while maintaining the separation between arguments), and wrap
 | 
					 | 
				
			||||||
# the whole thing up as a single "set" statement.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# This will of course break if any of these variables contains a newline or
 | 
					 | 
				
			||||||
# an unmatched quote.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
eval "set -- $(
 | 
					 | 
				
			||||||
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
 | 
					 | 
				
			||||||
        xargs -n1 |
 | 
					 | 
				
			||||||
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
 | 
					 | 
				
			||||||
        tr '\n' ' '
 | 
					 | 
				
			||||||
    )" '"$@"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
exec "$JAVACMD" "$@"
 | 
					 | 
				
			||||||
							
								
								
									
										93
									
								
								.github/workflow-samples/kotlin-dsl/gradlew.bat
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										93
									
								
								.github/workflow-samples/kotlin-dsl/gradlew.bat
									
									
									
									
										vendored
									
									
								
							@ -1,93 +0,0 @@
 | 
				
			|||||||
@rem
 | 
					 | 
				
			||||||
@rem Copyright 2015 the original author or authors.
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
@rem you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
@rem You may obtain a copy of the License at
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
@rem See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
@rem limitations under the License.
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@if "%DEBUG%"=="" @echo off
 | 
					 | 
				
			||||||
@rem ##########################################################################
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem  Gradle startup script for Windows
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
@rem ##########################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Set local scope for the variables with windows NT shell
 | 
					 | 
				
			||||||
if "%OS%"=="Windows_NT" setlocal
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set DIRNAME=%~dp0
 | 
					 | 
				
			||||||
if "%DIRNAME%"=="" set DIRNAME=.
 | 
					 | 
				
			||||||
@rem This is normally unused
 | 
					 | 
				
			||||||
set APP_BASE_NAME=%~n0
 | 
					 | 
				
			||||||
set APP_HOME=%DIRNAME%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
 | 
					 | 
				
			||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Find java.exe
 | 
					 | 
				
			||||||
if defined JAVA_HOME goto findJavaFromJavaHome
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set JAVA_EXE=java.exe
 | 
					 | 
				
			||||||
%JAVA_EXE% -version >NUL 2>&1
 | 
					 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto execute
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
goto fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:findJavaFromJavaHome
 | 
					 | 
				
			||||||
set JAVA_HOME=%JAVA_HOME:"=%
 | 
					 | 
				
			||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if exist "%JAVA_EXE%" goto execute
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
 | 
					 | 
				
			||||||
echo. 1>&2
 | 
					 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
goto fail
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:execute
 | 
					 | 
				
			||||||
@rem Setup the command line
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@rem Execute Gradle
 | 
					 | 
				
			||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:end
 | 
					 | 
				
			||||||
@rem End local scope for the variables with windows NT shell
 | 
					 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto mainEnd
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:fail
 | 
					 | 
				
			||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 | 
					 | 
				
			||||||
rem the _cmd.exe /c_ return code!
 | 
					 | 
				
			||||||
set EXIT_CODE=%ERRORLEVEL%
 | 
					 | 
				
			||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
 | 
					 | 
				
			||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
 | 
					 | 
				
			||||||
exit /b %EXIT_CODE%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:mainEnd
 | 
					 | 
				
			||||||
if "%OS%"=="Windows_NT" endlocal
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:omega
 | 
					 | 
				
			||||||
@ -1,15 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    id("com.gradle.develocity") version "4.2.2"
 | 
					 | 
				
			||||||
    id("com.gradle.common-custom-user-data-gradle-plugin") version "2.4.0"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
develocity {
 | 
					 | 
				
			||||||
    buildScan {
 | 
					 | 
				
			||||||
        termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
 | 
					 | 
				
			||||||
        termsOfUseAgree = "yes"
 | 
					 | 
				
			||||||
        uploadInBackground = false
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
rootProject.name = "kotlin-dsl"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							
								
								
									
										1
									
								
								.github/workflow-samples/no-ge/build.gradle
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflow-samples/no-ge/build.gradle
									
									
									
									
										vendored
									
									
								
							@ -1 +0,0 @@
 | 
				
			|||||||
// Required to keep dependabot happy
 | 
					 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
rootProject.name = 'no-ge'
 | 
					 | 
				
			||||||
@ -1,11 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    id "com.gradle.develocity" version "4.2.2" 
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
develocity {
 | 
					 | 
				
			||||||
    buildScan {
 | 
					 | 
				
			||||||
        termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
 | 
					 | 
				
			||||||
        termsOfUseAgree = "yes"
 | 
					 | 
				
			||||||
        uploadInBackground = false
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
// Required to keep dependabot happy
 | 
					 | 
				
			||||||
@ -1,20 +0,0 @@
 | 
				
			|||||||
plugins {
 | 
					 | 
				
			||||||
    id "com.gradle.develocity" version "4.2.2"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
develocity {
 | 
					 | 
				
			||||||
    buildScan {
 | 
					 | 
				
			||||||
        termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
 | 
					 | 
				
			||||||
        termsOfUseAgree = "yes"
 | 
					 | 
				
			||||||
        uploadInBackground = false
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
rootProject.name = 'no-wrapper'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
println "Using Gradle version: ${gradle.gradleVersion}"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def gradleVersionCheck = System.properties.gradleVersionCheck
 | 
					 | 
				
			||||||
if (gradleVersionCheck && gradle.gradleVersion != gradleVersionCheck) {
 | 
					 | 
				
			||||||
    throw new RuntimeException("Got the wrong version: expected ${gradleVersionCheck} but was ${gradle.gradleVersion}")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1 +0,0 @@
 | 
				
			|||||||
// Required to keep dependabot happy
 | 
					 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							@ -1,252 +0,0 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Copyright © 2015-2021 the original authors.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 | 
				
			||||||
# you may not use this file except in compliance with the License.
 | 
					 | 
				
			||||||
# You may obtain a copy of the License at
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#      https://www.apache.org/licenses/LICENSE-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Unless required by applicable law or agreed to in writing, software
 | 
					 | 
				
			||||||
# distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 | 
				
			||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 | 
				
			||||||
# See the License for the specific language governing permissions and
 | 
					 | 
				
			||||||
# limitations under the License.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Gradle start up script for POSIX generated by Gradle.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for running:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
 | 
					 | 
				
			||||||
#       noncompliant, but you have some other compliant shell such as ksh or
 | 
					 | 
				
			||||||
#       bash, then to run this script, type that shell name before the whole
 | 
					 | 
				
			||||||
#       command line, like:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#           ksh Gradle
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Busybox and similar reduced shells will NOT work, because this script
 | 
					 | 
				
			||||||
#       requires all of these POSIX shell features:
 | 
					 | 
				
			||||||
#         * functions;
 | 
					 | 
				
			||||||
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
 | 
					 | 
				
			||||||
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
 | 
					 | 
				
			||||||
#         * compound commands having a testable exit status, especially «case»;
 | 
					 | 
				
			||||||
#         * various built-in commands including «command», «set», and «ulimit».
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   Important for patching:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (2) This script targets any POSIX shell, so it avoids extensions provided
 | 
					 | 
				
			||||||
#       by Bash, Ksh, etc; in particular arrays are avoided.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       The "traditional" practice of packing multiple parameters into a
 | 
					 | 
				
			||||||
#       space-separated string is a well documented source of bugs and security
 | 
					 | 
				
			||||||
#       problems, so this is (mostly) avoided, by progressively accumulating
 | 
					 | 
				
			||||||
#       options in "$@", and eventually passing that to Java.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
 | 
					 | 
				
			||||||
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
 | 
					 | 
				
			||||||
#       see the in-line comments for details.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       There are tweaks for specific operating systems such as AIX, CygWin,
 | 
					 | 
				
			||||||
#       Darwin, MinGW, and NonStop.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   (3) This script is generated from the Groovy template
 | 
					 | 
				
			||||||
#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 | 
					 | 
				
			||||||
#       within the Gradle project.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#       You can find Gradle at https://github.com/gradle/gradle/.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
##############################################################################
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Attempt to set APP_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Resolve links: $0 may be a link
 | 
					 | 
				
			||||||
app_path=$0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Need this for daisy-chained symlinks.
 | 
					 | 
				
			||||||
while
 | 
					 | 
				
			||||||
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
 | 
					 | 
				
			||||||
    [ -h "$app_path" ]
 | 
					 | 
				
			||||||
do
 | 
					 | 
				
			||||||
    ls=$( ls -ld "$app_path" )
 | 
					 | 
				
			||||||
    link=${ls#*' -> '}
 | 
					 | 
				
			||||||
    case $link in             #(
 | 
					 | 
				
			||||||
      /*)   app_path=$link ;; #(
 | 
					 | 
				
			||||||
      *)    app_path=$APP_HOME$link ;;
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# This is normally unused
 | 
					 | 
				
			||||||
# shellcheck disable=SC2034
 | 
					 | 
				
			||||||
APP_BASE_NAME=${0##*/}
 | 
					 | 
				
			||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
 | 
					 | 
				
			||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
 | 
					 | 
				
			||||||
' "$PWD" ) || exit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
 | 
					 | 
				
			||||||
MAX_FD=maximum
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
warn () {
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
die () {
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    echo "$*"
 | 
					 | 
				
			||||||
    echo
 | 
					 | 
				
			||||||
    exit 1
 | 
					 | 
				
			||||||
} >&2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# OS specific support (must be 'true' or 'false').
 | 
					 | 
				
			||||||
cygwin=false
 | 
					 | 
				
			||||||
msys=false
 | 
					 | 
				
			||||||
darwin=false
 | 
					 | 
				
			||||||
nonstop=false
 | 
					 | 
				
			||||||
case "$( uname )" in                #(
 | 
					 | 
				
			||||||
  CYGWIN* )         cygwin=true  ;; #(
 | 
					 | 
				
			||||||
  Darwin* )         darwin=true  ;; #(
 | 
					 | 
				
			||||||
  MSYS* | MINGW* )  msys=true    ;; #(
 | 
					 | 
				
			||||||
  NONSTOP* )        nonstop=true ;;
 | 
					 | 
				
			||||||
esac
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Determine the Java command to use to start the JVM.
 | 
					 | 
				
			||||||
if [ -n "$JAVA_HOME" ] ; then
 | 
					 | 
				
			||||||
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
 | 
					 | 
				
			||||||
        # IBM's JDK on AIX uses strange locations for the executables
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/jre/sh/java
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
        JAVACMD=$JAVA_HOME/bin/java
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ ! -x "$JAVACMD" ] ; then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
    JAVACMD=java
 | 
					 | 
				
			||||||
    if ! command -v java >/dev/null 2>&1
 | 
					 | 
				
			||||||
    then
 | 
					 | 
				
			||||||
        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Please set the JAVA_HOME variable in your environment to match the
 | 
					 | 
				
			||||||
location of your Java installation."
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Increase the maximum file descriptors if we can.
 | 
					 | 
				
			||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
 | 
					 | 
				
			||||||
    case $MAX_FD in #(
 | 
					 | 
				
			||||||
      max*)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        MAX_FD=$( ulimit -H -n ) ||
 | 
					 | 
				
			||||||
            warn "Could not query maximum file descriptor limit"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
    case $MAX_FD in  #(
 | 
					 | 
				
			||||||
      '' | soft) :;; #(
 | 
					 | 
				
			||||||
      *)
 | 
					 | 
				
			||||||
        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
 | 
					 | 
				
			||||||
        # shellcheck disable=SC2039,SC3045
 | 
					 | 
				
			||||||
        ulimit -n "$MAX_FD" ||
 | 
					 | 
				
			||||||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
 | 
					 | 
				
			||||||
    esac
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command, stacking in reverse order:
 | 
					 | 
				
			||||||
#   * args from the command line
 | 
					 | 
				
			||||||
#   * the main class name
 | 
					 | 
				
			||||||
#   * -classpath
 | 
					 | 
				
			||||||
#   * -D...appname settings
 | 
					 | 
				
			||||||
#   * --module-path (only if needed)
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
 | 
					 | 
				
			||||||
if "$cygwin" || "$msys" ; then
 | 
					 | 
				
			||||||
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
 | 
					 | 
				
			||||||
    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    JAVACMD=$( cygpath --unix "$JAVACMD" )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
 | 
					 | 
				
			||||||
    for arg do
 | 
					 | 
				
			||||||
        if
 | 
					 | 
				
			||||||
            case $arg in                                #(
 | 
					 | 
				
			||||||
              -*)   false ;;                            # don't mess with options #(
 | 
					 | 
				
			||||||
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
 | 
					 | 
				
			||||||
                    [ -e "$t" ] ;;                      #(
 | 
					 | 
				
			||||||
              *)    false ;;
 | 
					 | 
				
			||||||
            esac
 | 
					 | 
				
			||||||
        then
 | 
					 | 
				
			||||||
            arg=$( cygpath --path --ignore --mixed "$arg" )
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        # Roll the args list around exactly as many times as the number of
 | 
					 | 
				
			||||||
        # args, so each arg winds up back in the position where it started, but
 | 
					 | 
				
			||||||
        # possibly modified.
 | 
					 | 
				
			||||||
        #
 | 
					 | 
				
			||||||
        # NB: a `for` loop captures its iteration list before it begins, so
 | 
					 | 
				
			||||||
        # changing the positional parameters here affects neither the number of
 | 
					 | 
				
			||||||
        # iterations, nor the values presented in `arg`.
 | 
					 | 
				
			||||||
        shift                   # remove old arg
 | 
					 | 
				
			||||||
        set -- "$@" "$arg"      # push replacement arg
 | 
					 | 
				
			||||||
    done
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
					 | 
				
			||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Collect all arguments for the java command:
 | 
					 | 
				
			||||||
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
 | 
					 | 
				
			||||||
#     and any embedded shellness will be escaped.
 | 
					 | 
				
			||||||
#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
 | 
					 | 
				
			||||||
#     treated as '${Hostname}' itself on the command line.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
set -- \
 | 
					 | 
				
			||||||
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
 | 
					 | 
				
			||||||
        -classpath "$CLASSPATH" \
 | 
					 | 
				
			||||||
        org.gradle.wrapper.GradleWrapperMain \
 | 
					 | 
				
			||||||
        "$@"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Stop when "xargs" is not available.
 | 
					 | 
				
			||||||
if ! command -v xargs >/dev/null 2>&1
 | 
					 | 
				
			||||||
then
 | 
					 | 
				
			||||||
    die "xargs is not available"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use "xargs" to parse quoted args.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# In Bash we could simply go:
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
 | 
					 | 
				
			||||||
#   set -- "${ARGS[@]}" "$@"
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
 | 
					 | 
				
			||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
 | 
					 | 
				
			||||||
# character that might be a shell metacharacter, then use eval to reverse
 | 
					 | 
				
			||||||
# that process (while maintaining the separation between arguments), and wrap
 | 
					 | 
				
			||||||
# the whole thing up as a single "set" statement.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# This will of course break if any of these variables contains a newline or
 | 
					 | 
				
			||||||
# an unmatched quote.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
eval "set -- $(
 | 
					 | 
				
			||||||
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
 | 
					 | 
				
			||||||
        xargs -n1 |
 | 
					 | 
				
			||||||
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
 | 
					 | 
				
			||||||
        tr '\n' ' '
 | 
					 | 
				
			||||||
    )" '"$@"'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
exec "$JAVACMD" "$@"
 | 
					 | 
				
			||||||
							
								
								
									
										57
									
								
								.github/workflows/ci-check-and-unit-test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										57
									
								
								.github/workflows/ci-check-and-unit-test.yml
									
									
									
									
										vendored
									
									
								
							@ -1,57 +0,0 @@
 | 
				
			|||||||
name: CI-check-and-unit-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
    - 'main'
 | 
					 | 
				
			||||||
    - 'release/**'
 | 
					 | 
				
			||||||
    paths-ignore:
 | 
					 | 
				
			||||||
    - 'dist/**'
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  check-format-and-unit-test:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.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@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        gradle-version: '8.14.2'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Install npm dependencies
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        npm clean-install
 | 
					 | 
				
			||||||
      working-directory: sources
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Check formatting and compile
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        npm run check
 | 
					 | 
				
			||||||
        npm run compile
 | 
					 | 
				
			||||||
      working-directory: sources
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
 | 
					 | 
				
			||||||
        DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
 | 
					 | 
				
			||||||
        DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Run unit tests
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        npm test
 | 
					 | 
				
			||||||
      working-directory: sources
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
 | 
					 | 
				
			||||||
        DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
 | 
					 | 
				
			||||||
        DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
 | 
					 | 
				
			||||||
							
								
								
									
										40
									
								
								.github/workflows/ci-check-no-dist-update.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								.github/workflows/ci-check-no-dist-update.yml
									
									
									
									
										vendored
									
									
								
							@ -1,40 +0,0 @@
 | 
				
			|||||||
name: CI-check-no-dist-update
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Prohibit any change to 'dist/**' on a non-release branch
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
    paths:
 | 
					 | 
				
			||||||
      - 'dist/**'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  fail-on-dist-update:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        fetch-depth: 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Get changed files
 | 
					 | 
				
			||||||
      id: changed-files
 | 
					 | 
				
			||||||
      uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        files: |
 | 
					 | 
				
			||||||
          dist/**
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Print changes to dist directory
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        for file in ${ALL_CHANGED_FILES}; do
 | 
					 | 
				
			||||||
          echo "$file was changed"
 | 
					 | 
				
			||||||
        done
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - run: |
 | 
					 | 
				
			||||||
        echo "The 'dist' directory is automatically updated by the release process."
 | 
					 | 
				
			||||||
        echo "It should not be updated manually in a non-release branch or a pull request."
 | 
					 | 
				
			||||||
        exit 1
 | 
					 | 
				
			||||||
							
								
								
									
										46
									
								
								.github/workflows/ci-codeql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										46
									
								
								.github/workflows/ci-codeql.yml
									
									
									
									
										vendored
									
									
								
							@ -1,46 +0,0 @@
 | 
				
			|||||||
name: CI-codeql
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
    - 'main'
 | 
					 | 
				
			||||||
    - 'release/**'
 | 
					 | 
				
			||||||
    - 'dev/**' # Allow running Code QL on dev branches without a PR
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
    - 'main'
 | 
					 | 
				
			||||||
  schedule:
 | 
					 | 
				
			||||||
    - cron: '25 23 * * 2'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  analyze:
 | 
					 | 
				
			||||||
    name: Analyze
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      actions: read
 | 
					 | 
				
			||||||
      contents: read
 | 
					 | 
				
			||||||
      security-events: write
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        language: [ 'javascript-typescript' ]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout repository
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Initializes the CodeQL tools for scanning.
 | 
					 | 
				
			||||||
    - name: Initialize CodeQL
 | 
					 | 
				
			||||||
      uses: github/codeql-action/init@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        languages: ${{ matrix.language }}
 | 
					 | 
				
			||||||
        config: |
 | 
					 | 
				
			||||||
          paths: 
 | 
					 | 
				
			||||||
          - sources/src
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Perform CodeQL Analysis
 | 
					 | 
				
			||||||
      uses: github/codeql-action/analyze@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
 | 
					 | 
				
			||||||
							
								
								
									
										38
									
								
								.github/workflows/ci-init-script-check.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								.github/workflows/ci-init-script-check.yml
									
									
									
									
										vendored
									
									
								
							@ -1,38 +0,0 @@
 | 
				
			|||||||
name: CI-init-script-check
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
    - 'main'
 | 
					 | 
				
			||||||
    - 'release/**'
 | 
					 | 
				
			||||||
    paths-ignore:
 | 
					 | 
				
			||||||
    - 'dist/**'
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
    paths:
 | 
					 | 
				
			||||||
      - '.github/workflows/ci-init-script-check.yml'
 | 
					 | 
				
			||||||
      - 'sources/src/resources/init-scripts/**'
 | 
					 | 
				
			||||||
      - 'sources/test/init-scripts/**'
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  test-init-scripts:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Setup Java
 | 
					 | 
				
			||||||
      uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        distribution: temurin
 | 
					 | 
				
			||||||
        java-version: 17
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      # Use a released version to avoid breakages
 | 
					 | 
				
			||||||
      uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
 | 
					 | 
				
			||||||
    - name: Run integration tests
 | 
					 | 
				
			||||||
      working-directory: sources/test/init-scripts
 | 
					 | 
				
			||||||
      run: ./gradlew check
 | 
					 | 
				
			||||||
							
								
								
									
										39
									
								
								.github/workflows/ci-integ-test-full.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								.github/workflows/ci-integ-test-full.yml
									
									
									
									
										vendored
									
									
								
							@ -1,39 +0,0 @@
 | 
				
			|||||||
name: CI-integ-test-full
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
    - 'main'
 | 
					 | 
				
			||||||
    paths:
 | 
					 | 
				
			||||||
    - 'dist/**'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
concurrency:
 | 
					 | 
				
			||||||
  group: integ-test
 | 
					 | 
				
			||||||
  cancel-in-progress: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  caching-integ-tests:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/suite-integ-test-caching.yml
 | 
					 | 
				
			||||||
    concurrency:
 | 
					 | 
				
			||||||
      group: CI-integ-test-full
 | 
					 | 
				
			||||||
      cancel-in-progress: false
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
 | 
					 | 
				
			||||||
      skip-dist: true
 | 
					 | 
				
			||||||
    secrets: inherit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  other-integ-tests:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/suite-integ-test-other.yml
 | 
					 | 
				
			||||||
    concurrency:
 | 
					 | 
				
			||||||
      group: CI-integ-test-full
 | 
					 | 
				
			||||||
      cancel-in-progress: false
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
 | 
					 | 
				
			||||||
      skip-dist: true
 | 
					 | 
				
			||||||
    secrets: inherit
 | 
					 | 
				
			||||||
							
								
								
									
										45
									
								
								.github/workflows/ci-integ-test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								.github/workflows/ci-integ-test.yml
									
									
									
									
										vendored
									
									
								
							@ -1,45 +0,0 @@
 | 
				
			|||||||
name: CI-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
    - 'main'
 | 
					 | 
				
			||||||
    - 'release/**'
 | 
					 | 
				
			||||||
    - 'dev/**' # Allow running tests on dev branches without a PR
 | 
					 | 
				
			||||||
    paths-ignore:
 | 
					 | 
				
			||||||
    - 'dist/**'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
concurrency:
 | 
					 | 
				
			||||||
  group: integ-test
 | 
					 | 
				
			||||||
  cancel-in-progress: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  build-distribution:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Build and upload distribution
 | 
					 | 
				
			||||||
      if: ${{ needs.determine-suite.outputs.suite != 'full' }}
 | 
					 | 
				
			||||||
      uses: ./.github/actions/build-dist
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  caching-integ-tests:
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/suite-integ-test-caching.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: false
 | 
					 | 
				
			||||||
    secrets: inherit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  other-integ-tests:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/suite-integ-test-other.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: false
 | 
					 | 
				
			||||||
    secrets: inherit
 | 
					 | 
				
			||||||
							
								
								
									
										57
									
								
								.github/workflows/ci-ossf-scorecard.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										57
									
								
								.github/workflows/ci-ossf-scorecard.yml
									
									
									
									
										vendored
									
									
								
							@ -1,57 +0,0 @@
 | 
				
			|||||||
name: CI-ossf-scorecard
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  schedule:
 | 
					 | 
				
			||||||
    - cron: '0 5 * * 1'
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
      - main
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  analysis:
 | 
					 | 
				
			||||||
    name: Scorecard analysis
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      # Needed to upload the results to code-scanning dashboard.
 | 
					 | 
				
			||||||
      security-events: write
 | 
					 | 
				
			||||||
      # Needed to publish results and get a badge (see publish_results below).
 | 
					 | 
				
			||||||
      id-token: write
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: 'Checkout code'
 | 
					 | 
				
			||||||
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          persist-credentials: false
 | 
					 | 
				
			||||||
          show-progress: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: 'Run analysis'
 | 
					 | 
				
			||||||
        uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          results_file: results.sarif
 | 
					 | 
				
			||||||
          results_format: sarif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          # Public repositories:
 | 
					 | 
				
			||||||
          #   - Publish results to OpenSSF REST API for easy access by consumers
 | 
					 | 
				
			||||||
          #   - Allows the repository to include the Scorecard badge.
 | 
					 | 
				
			||||||
          #   - See https://github.com/ossf/scorecard-action#publishing-results.
 | 
					 | 
				
			||||||
          # For private repositories:
 | 
					 | 
				
			||||||
          #   - `publish_results` will always be set to `false`, regardless
 | 
					 | 
				
			||||||
          #     of the value entered here.
 | 
					 | 
				
			||||||
          publish_results: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
 | 
					 | 
				
			||||||
      # format to the repository Actions tab.
 | 
					 | 
				
			||||||
      - name: 'Upload artifact'
 | 
					 | 
				
			||||||
        uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          name: SARIF file
 | 
					 | 
				
			||||||
          path: results.sarif
 | 
					 | 
				
			||||||
          retention-days: 5
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      # Upload the results to GitHub's code scanning dashboard.
 | 
					 | 
				
			||||||
      - name: 'Upload to code-scanning'
 | 
					 | 
				
			||||||
        uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          sarif_file: results.sarif
 | 
					 | 
				
			||||||
							
								
								
									
										75
									
								
								.github/workflows/ci-update-dist.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										75
									
								
								.github/workflows/ci-update-dist.yml
									
									
									
									
										vendored
									
									
								
							@ -1,75 +0,0 @@
 | 
				
			|||||||
name: CI-update-dist
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
    - 'main'
 | 
					 | 
				
			||||||
    - 'prerelease/**'
 | 
					 | 
				
			||||||
    - 'release/**'
 | 
					 | 
				
			||||||
    paths-ignore:
 | 
					 | 
				
			||||||
    - 'dist/**'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  update-dist:
 | 
					 | 
				
			||||||
    # Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
 | 
					 | 
				
			||||||
    # it would erroneously update `dist` on their branch (and the pull request)
 | 
					 | 
				
			||||||
    if: github.repository == 'gradle/actions'
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        token: ${{ secrets.BOT_GITHUB_TOKEN }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Set up Node.js
 | 
					 | 
				
			||||||
      uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        node-version: 20
 | 
					 | 
				
			||||||
        cache: npm
 | 
					 | 
				
			||||||
        cache-dependency-path: sources/package-lock.json
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Install npm dependencies
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        npm clean-install
 | 
					 | 
				
			||||||
      working-directory: sources
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Build distribution
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        npm run check
 | 
					 | 
				
			||||||
        npm run compile
 | 
					 | 
				
			||||||
      working-directory: sources
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        NODE_OPTIONS: '-r @gradle-tech/develocity-agent/preload'
 | 
					 | 
				
			||||||
        DEVELOCITY_URL: 'https://ge.solutions-team.gradle.com'
 | 
					 | 
				
			||||||
        DEVELOCITY_ACCESS_KEY: '${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Copy the generated sources/dist directory to the top-level dist
 | 
					 | 
				
			||||||
      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@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        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
 | 
					 | 
				
			||||||
							
								
								
									
										17
									
								
								.github/workflows/ci-validate-wrappers.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/ci-validate-wrappers.yml
									
									
									
									
										vendored
									
									
								
							@ -1,17 +0,0 @@
 | 
				
			|||||||
name: CI-validate-wrappers
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  validation:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
      - uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
 | 
					 | 
				
			||||||
							
								
								
									
										70
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,70 @@
 | 
				
			|||||||
 | 
					# For most projects, this workflow file will not need changing; you simply need
 | 
				
			||||||
 | 
					# to commit it to your repository.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# You may wish to alter this file to override the set of languages analyzed,
 | 
				
			||||||
 | 
					# or to provide custom queries or build logic.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# ******** NOTE ********
 | 
				
			||||||
 | 
					# We have attempted to detect the languages in your repository. Please check
 | 
				
			||||||
 | 
					# the `language` matrix defined below to confirm you have the correct set of
 | 
				
			||||||
 | 
					# supported CodeQL languages.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					name: "CodeQL"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches: [ main ]
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    # The branches below must be a subset of the branches above
 | 
				
			||||||
 | 
					    branches: [ main ]
 | 
				
			||||||
 | 
					  schedule:
 | 
				
			||||||
 | 
					    - cron: '25 23 * * 2'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  analyze:
 | 
				
			||||||
 | 
					    name: Analyze
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      actions: read
 | 
				
			||||||
 | 
					      contents: read
 | 
				
			||||||
 | 
					      security-events: write
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      fail-fast: false
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        language: [ 'javascript' ]
 | 
				
			||||||
 | 
					        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
 | 
				
			||||||
 | 
					        # Learn more about CodeQL language support at https://git.io/codeql-language-support
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout repository
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Initializes the CodeQL tools for scanning.
 | 
				
			||||||
 | 
					    - name: Initialize CodeQL
 | 
				
			||||||
 | 
					      uses: github/codeql-action/init@v1
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        languages: ${{ matrix.language }}
 | 
				
			||||||
 | 
					        # If you wish to specify custom queries, you can do so here or in a config file.
 | 
				
			||||||
 | 
					        # By default, queries listed here will override any specified in a config file.
 | 
				
			||||||
 | 
					        # Prefix the list here with "+" to use these queries and those in the config file.
 | 
				
			||||||
 | 
					        # queries: ./path/to/local/query, your-org/your-repo/queries@main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
 | 
				
			||||||
 | 
					    # If this step fails, then you should remove it and run the build manually (see below)
 | 
				
			||||||
 | 
					    - name: Autobuild
 | 
				
			||||||
 | 
					      uses: github/codeql-action/autobuild@v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # ℹ️ Command-line programs to run using the OS shell.
 | 
				
			||||||
 | 
					    # 📚 https://git.io/JvXDl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
 | 
				
			||||||
 | 
					    #    and modify them (or add more) to build your code if your project
 | 
				
			||||||
 | 
					    #    uses a compiled language
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #- run: |
 | 
				
			||||||
 | 
					    #   make bootstrap
 | 
				
			||||||
 | 
					    #   make release
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Perform CodeQL Analysis
 | 
				
			||||||
 | 
					      uses: github/codeql-action/analyze@v1
 | 
				
			||||||
							
								
								
									
										116
									
								
								.github/workflows/demo-job-summary.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										116
									
								
								.github/workflows/demo-job-summary.yml
									
									
									
									
										vendored
									
									
								
							@ -1,116 +0,0 @@
 | 
				
			|||||||
name: Demo Job Summary, for Gradle builds
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  build-distribution:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Build and upload distribution
 | 
					 | 
				
			||||||
      uses: ./.github/actions/build-dist
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  many-gradle-builds:
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false
 | 
					 | 
				
			||||||
        cache-cleanup: 'on-success'
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew assemble
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project without Build Scan®
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew assemble check --no-scan
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project with Build Scan® publish failure
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew check -Dgradle.enterprise.url=https://not.valid.server
 | 
					 | 
				
			||||||
    - name: Build groovy-dsl project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew assemble
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project with multiple gradle invocations
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: | 
 | 
					 | 
				
			||||||
         ./gradlew tasks --no-daemon
 | 
					 | 
				
			||||||
         ./gradlew help check
 | 
					 | 
				
			||||||
         ./gradlew wrapper --gradle-version 8.7 --gradle-distribution-sha256-sum 544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d
 | 
					 | 
				
			||||||
    - name: Fail groovy-dsl project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
      run: ./gradlew not-a-real-task
 | 
					 | 
				
			||||||
    - name: Dependency submission
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-upload
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  successful-builds-with-no-summary:
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        add-job-summary: on-failure
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew assemble
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project without Build Scan®
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew assemble check --no-scan
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  pre-existing-gradle-home:
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Pre-create Gradle User Home
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        mkdir ~/.gradle
 | 
					 | 
				
			||||||
        mkdir ~/.gradle/caches
 | 
					 | 
				
			||||||
        touch ~/.gradle/caches/dummy.txt
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
    - name: Run build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew assemble
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  cache-read-only:
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew assemble
 | 
					 | 
				
			||||||
							
								
								
									
										77
									
								
								.github/workflows/demo-pr-build-scan-comment.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										77
									
								
								.github/workflows/demo-pr-build-scan-comment.yml
									
									
									
									
										vendored
									
									
								
							@ -1,77 +0,0 @@
 | 
				
			|||||||
name: Demo adding Build Scan® comment to PR
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
    types: [assigned, review_requested]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  build-distribution:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Build and upload distribution
 | 
					 | 
				
			||||||
      uses: ./.github/actions/build-dist
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  successful-build-with-always-comment:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      pull-requests: write
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        add-job-summary-as-pr-comment: always
 | 
					 | 
				
			||||||
    - name: Run build with Gradle wrapper
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew build --scan
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  successful-build-with-comment-on-failure:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      pull-requests: write
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        add-job-summary-as-pr-comment: on-failure
 | 
					 | 
				
			||||||
    - name: Run build with Gradle wrapper
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew build --scan
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  failing-build-with-comment-on-failure:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      pull-requests: write
 | 
					 | 
				
			||||||
    needs: build-distribution
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        add-job-summary-as-pr-comment: on-failure
 | 
					 | 
				
			||||||
    - name: Run build with Gradle wrapper
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew no-a-real-task --scan
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
							
								
								
									
										23
									
								
								.github/workflows/dev.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								.github/workflows/dev.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					name: Verify generated outputs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  check:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Build
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        npm install
 | 
				
			||||||
 | 
					        npm run all
 | 
				
			||||||
 | 
					    - name: Check for uncommitted changes
 | 
				
			||||||
 | 
					      # Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        git diff --exit-code --stat -- . ':!node_modules' \
 | 
				
			||||||
 | 
					        || (echo "##[error] found changed files after build. please 'npm run all'" \
 | 
				
			||||||
 | 
					                 "and check in all changes" \
 | 
				
			||||||
 | 
					            && exit 1)
 | 
				
			||||||
							
								
								
									
										34
									
								
								.github/workflows/failure-cases.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/failure-cases.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					name: Execute failure cases
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  wrapper-missing:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Test wrapper missing
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      continue-on-error: true
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper
 | 
				
			||||||
 | 
					        arguments: help
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  bad-configuration:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Test bad config value
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      continue-on-error: true
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper
 | 
				
			||||||
 | 
					        arguments: help
 | 
				
			||||||
 | 
					        cache-disabled: yes
 | 
				
			||||||
@ -1,69 +0,0 @@
 | 
				
			|||||||
name: Test develocity injection
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  build-scan-publish:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          - java-version: 17
 | 
					 | 
				
			||||||
          - gradle: '8.14.3'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '7.6.2'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '6.9.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '5.6.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        java-version: ${{ matrix.java-version }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      id: setup-gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        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'
 | 
					 | 
				
			||||||
    - name: Run Gradle build
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/no-ge
 | 
					 | 
				
			||||||
      run: gradle help
 | 
					 | 
				
			||||||
    - name: Check Build Scan url
 | 
					 | 
				
			||||||
      if: ${{ !steps.gradle.outputs.build-scan-url }}
 | 
					 | 
				
			||||||
      uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        script: |
 | 
					 | 
				
			||||||
          core.setFailed('No Build Scan detected')   
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							
								
								
									
										107
									
								
								.github/workflows/integ-test-cache-cleanup.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										107
									
								
								.github/workflows/integ-test-cache-cleanup.yml
									
									
									
									
										vendored
									
									
								
							@ -1,107 +0,0 @@
 | 
				
			|||||||
name: Test cache cleanup
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  # Requires a fresh cache entry each run
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  cache-cleanup-full-build:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
    - name: Build with 3.1
 | 
					 | 
				
			||||||
      working-directory: sources/test/jest/resources/cache-cleanup
 | 
					 | 
				
			||||||
      run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1" build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Second build will use the cache from the first build, but cleanup should remove unused artifacts
 | 
					 | 
				
			||||||
  cache-cleanup-assemble-build:
 | 
					 | 
				
			||||||
    needs: cache-cleanup-full-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false
 | 
					 | 
				
			||||||
        cache-cleanup: 'on-success'
 | 
					 | 
				
			||||||
    - name: Build with 3.1.1
 | 
					 | 
				
			||||||
      working-directory: sources/test/jest/resources/cache-cleanup
 | 
					 | 
				
			||||||
      run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  cache-cleanup-check-clean-cache:
 | 
					 | 
				
			||||||
    needs: cache-cleanup-assemble-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Report Gradle User Home
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        du -hc $GRADLE_USER_HOME/caches/modules-2
 | 
					 | 
				
			||||||
        du -hc $GRADLE_USER_HOME/wrapper/dists
 | 
					 | 
				
			||||||
    - name: Verify cleaned cache
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -e $GRADLE_USER_HOME/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1.1 ]; then
 | 
					 | 
				
			||||||
          echo "::error ::Should find commons-math3 3.1.1 in cache"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        if [ -e $GRADLE_USER_HOME/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1 ]; then
 | 
					 | 
				
			||||||
          echo "::error ::Should NOT find commons-math3 3.1 in cache"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        if [ ! -e $GRADLE_USER_HOME/wrapper/dists/gradle-8.0.2-bin ]; then
 | 
					 | 
				
			||||||
          echo "::error ::Should find gradle-8.0.2 in wrapper/dists"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
							
								
								
									
										184
									
								
								.github/workflows/integ-test-caching-config.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										184
									
								
								.github/workflows/integ-test-caching-config.yml
									
									
									
									
										vendored
									
									
								
							@ -1,184 +0,0 @@
 | 
				
			|||||||
name: Test caching configuration
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  caching-config-seed-build:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
        # Add "application" to main cache entry but omit "notifications"
 | 
					 | 
				
			||||||
        gradle-home-cache-includes: |
 | 
					 | 
				
			||||||
            caches
 | 
					 | 
				
			||||||
            application
 | 
					 | 
				
			||||||
        # Exclude build-cache from main cache entry
 | 
					 | 
				
			||||||
        gradle-home-cache-excludes: |
 | 
					 | 
				
			||||||
            caches/build-cache-*
 | 
					 | 
				
			||||||
            caches/*/executionHistory
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
 | 
					 | 
				
			||||||
  caching-config-verify-build:
 | 
					 | 
				
			||||||
    needs: caching-config-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        # Use the same configuration as used in the seed build
 | 
					 | 
				
			||||||
        gradle-home-cache-includes: |
 | 
					 | 
				
			||||||
            caches
 | 
					 | 
				
			||||||
            application
 | 
					 | 
				
			||||||
        gradle-home-cache-excludes: |
 | 
					 | 
				
			||||||
            caches/build-cache-*
 | 
					 | 
				
			||||||
            caches/*/executionHistory
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build with --offline
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test --offline
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that build scans are captured when caching is explicitly disabled
 | 
					 | 
				
			||||||
  caching-config-cache-disabled:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-disabled: true
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew help
 | 
					 | 
				
			||||||
    - name: Check Build Scan url is captured
 | 
					 | 
				
			||||||
      if: ${{ !steps.gradle.outputs.build-scan-url }}
 | 
					 | 
				
			||||||
      uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        script: |
 | 
					 | 
				
			||||||
          core.setFailed('No Build Scan detected')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that build scans are captured when caching is disabled because Gradle User Home already exists
 | 
					 | 
				
			||||||
  caching-config-cache-disabled-pre-existing-gradle-home:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest # This test only runs on Ubuntu
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Create dummy Gradle User Home
 | 
					 | 
				
			||||||
      run: mkdir -p ~/.gradle/caches
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew help
 | 
					 | 
				
			||||||
    - name: Check Build Scan url is captured
 | 
					 | 
				
			||||||
      if: ${{ !steps.gradle.outputs.build-scan-url }}
 | 
					 | 
				
			||||||
      uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        script: |
 | 
					 | 
				
			||||||
          core.setFailed('No Build Scan detected')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test seed the cache with cache-write-only and verify with cache-read-only
 | 
					 | 
				
			||||||
  caching-config-seed-write-only:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-write-only: true
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  caching-config-verify-write-only:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
    needs: caching-config-seed-write-only
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build with --offline
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test --offline
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							
								
								
									
										192
									
								
								.github/workflows/integ-test-dependency-graph.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										192
									
								
								.github/workflows/integ-test-dependency-graph.yml
									
									
									
									
										vendored
									
									
								
							@ -1,192 +0,0 @@
 | 
				
			|||||||
name: Test dependency graph
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
  GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  dependency-graph-groovy-upload:
 | 
					 | 
				
			||||||
    runs-on: "ubuntu-latest"
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle for dependency-graph generate
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-upload
 | 
					 | 
				
			||||||
    - name: Run gradle build
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-graph-groovy-submit:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    needs: [dependency-graph-groovy-upload]
 | 
					 | 
				
			||||||
    runs-on: "ubuntu-latest"
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Submit dependency graphs
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: download-and-submit
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-graph-kotlin-generate-and-submit:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: "ubuntu-latest"
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle for dependency-graph generate
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-submit
 | 
					 | 
				
			||||||
    - name: Run gradle build
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-graph-multiple-builds:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: "ubuntu-latest"
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle for dependency-graph generate
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-submit
 | 
					 | 
				
			||||||
    - id: gradle-assemble
 | 
					 | 
				
			||||||
      run: ./gradlew assemble
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - id: gradle-build
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - id: gradle-build-again
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - name: Check generated dependency graphs
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "gradle-assemble report file: ${{ steps.gradle-assemble.outputs.dependency-graph-file }}"
 | 
					 | 
				
			||||||
        echo "gradle-build report file: ${{ steps.gradle-build.outputs.dependency-graph-file }}"
 | 
					 | 
				
			||||||
        echo "gradle-build-again report file: ${{ steps.gradle-build-again.outputs.dependency-graph-file }}"
 | 
					 | 
				
			||||||
        ls -l dependency-graph-reports
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.gradle-assemble.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find gradle-assemble dependency graph file"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.gradle-build.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find gradle-build dependency graph files"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.gradle-build-again.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find gradle-build-again dependency graph files"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
  dependency-graph-config-cache:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest # Test is not compatible with Windows
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle for dependency-graph generate
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-submit
 | 
					 | 
				
			||||||
    - id: config-cache-store
 | 
					 | 
				
			||||||
      run: ./gradlew assemble --configuration-cache
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - name: Check and delete generated dependency graph
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.config-cache-store.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find config-cache-store dependency graph files"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        rm ${{ steps.config-cache-store.outputs.dependency-graph-file }}
 | 
					 | 
				
			||||||
    - id: config-cache-reuse
 | 
					 | 
				
			||||||
      run: ./gradlew assemble --configuration-cache
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - name: Check no dependency graph is generated
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -z "$(ls -A dependency-graph-reports)" ]; then
 | 
					 | 
				
			||||||
            echo "Expected no dependency graph files to be generated"
 | 
					 | 
				
			||||||
            ls -l dependency-graph-reports
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi        
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-graph-generate-submit-and-upload:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: "ubuntu-latest"
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle for dependency-graph generate
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-submit-and-upload
 | 
					 | 
				
			||||||
    - name: Run gradle build
 | 
					 | 
				
			||||||
      id: gradle-build
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-graph-generate-submit-and-upload-check:
 | 
					 | 
				
			||||||
    needs: [dependency-graph-generate-submit-and-upload]
 | 
					 | 
				
			||||||
    runs-on: "ubuntu-latest"
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Download dependency-graph artifact
 | 
					 | 
				
			||||||
      uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        path: downloaded-dependency-graphs
 | 
					 | 
				
			||||||
        pattern: dependency-graph_*dependency-graph-generate-submit-and-upload.json
 | 
					 | 
				
			||||||
    - name: Check for downloaded dependency graphs
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        ls -A "${{ github.workspace }}/downloaded-dependency-graphs"
 | 
					 | 
				
			||||||
        if [ -z "$(ls -A "${{ github.workspace }}/downloaded-dependency-graphs")" ]; then
 | 
					 | 
				
			||||||
          echo "No dependency graph files found"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
@ -1,103 +0,0 @@
 | 
				
			|||||||
name: Test dependency submission failures
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
  GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  dependency-submission-failures-failing-build:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Submit with failing build
 | 
					 | 
				
			||||||
      id: gradle-build
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        additional-arguments: fail
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
    - name: Check step failed
 | 
					 | 
				
			||||||
      if: steps.gradle-build.outcome != 'failure'
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "Expected dependency submission step to fail"
 | 
					 | 
				
			||||||
        exit 1
 | 
					 | 
				
			||||||
    - name: Check no dependency graph is generated
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -z "$(ls -A dependency-graph-reports)" ]; then
 | 
					 | 
				
			||||||
            echo "Expected no dependency graph files to be generated"
 | 
					 | 
				
			||||||
            ls -l dependency-graph-reports
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-failures-unsupported-gradle-version:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Submit with unsupported Gradle version
 | 
					 | 
				
			||||||
      id: gradle-build
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        gradle-version: '7.0.1'
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
    - name: Check step failed
 | 
					 | 
				
			||||||
      if: steps.gradle-build.outcome != 'failure'
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "Expected dependency submission step to fail"
 | 
					 | 
				
			||||||
        exit 1
 | 
					 | 
				
			||||||
    - name: Check no dependency graph is generated
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -z "$(ls -A dependency-graph-reports)" ]; then
 | 
					 | 
				
			||||||
            echo "Expected no dependency graph files to be generated"
 | 
					 | 
				
			||||||
            ls -l dependency-graph-reports
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-failures-insufficient-permissions:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: read
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Submit with insufficient permissions
 | 
					 | 
				
			||||||
      id: gradle-build
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
    - name: Check step failed
 | 
					 | 
				
			||||||
      if: steps.gradle-build.outcome != 'failure'
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "Expected dependency submission step to fail"
 | 
					 | 
				
			||||||
        exit 1
 | 
					 | 
				
			||||||
@ -1,423 +0,0 @@
 | 
				
			|||||||
name: Test dependency submission
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
  GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  dependency-submission-groovy-generate-and-upload:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Generate dependency graph
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-upload
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        cache-read-only: false
 | 
					 | 
				
			||||||
      env: 
 | 
					 | 
				
			||||||
        GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-groovy-restore-cache:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    needs: [dependency-submission-groovy-generate-and-upload]
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Restore dependency graph
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        additional-arguments: --offline
 | 
					 | 
				
			||||||
      env: 
 | 
					 | 
				
			||||||
        GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-groovy-download-and-submit:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    needs: [dependency-submission-groovy-generate-and-upload]
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Submit dependency graph
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: download-and-submit
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-generate-and-upload-${{ matrix.os }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-kotlin-generate-and-submit:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Generate and submit dependency graph
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-multiple-builds:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - id: kotlin-dsl
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
    - id: groovy-dsl
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - id: groovy-dsl-again
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        dependency-resolution-task: assemble
 | 
					 | 
				
			||||||
    - name: Check generated dependency graphs
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "kotlin-dsl report file: ${{ steps.kotlin-dsl.outputs.dependency-graph-file }}"
 | 
					 | 
				
			||||||
        echo "groovy-dsl report file: ${{ steps.groovy-dsl.outputs.dependency-graph-file }}"
 | 
					 | 
				
			||||||
        echo "groovy-dsl-again report file: ${{ steps.groovy-dsl-again.outputs.dependency-graph-file }}"
 | 
					 | 
				
			||||||
        ls -l dependency-graph-reports
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.kotlin-dsl.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find kotlin-dsl dependency graph file"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.groovy-dsl.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find groovy-dsl dependency graph file"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.groovy-dsl-again.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find groovy-dsl-again dependency graph file"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-multiple-builds-upload:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - id: kotlin-dsl
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-upload
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
    - id: groovy-dsl
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-upload
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-config-cache:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest # Test is not compatible with Windows
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - id: config-cache-store
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        additional-arguments: --configuration-cache
 | 
					 | 
				
			||||||
    - name: Check and delete generated dependency graph
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.config-cache-store.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find config-cache-store dependency graph files"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        rm ${{ steps.config-cache-store.outputs.dependency-graph-file }}*
 | 
					 | 
				
			||||||
    - id: config-cache-reuse
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        additional-arguments: --configuration-cache
 | 
					 | 
				
			||||||
    - name: Check no dependency graph is generated
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -z "$(ls -A dependency-graph-reports)" ]; then
 | 
					 | 
				
			||||||
            echo "Expected no dependency graph files to be generated"
 | 
					 | 
				
			||||||
            ls -l dependency-graph-reports
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-gradle-versions:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
        gradle: ['9.0.0', '8.14.3', '8.0.2', '7.6.4', '7.1.1', '6.9.4', '6.0.1', '5.6.4', '5.2.1']
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          - java-version: 17
 | 
					 | 
				
			||||||
          - gradle: '8.14.3'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '8.0.2'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '7.6.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '7.1.1'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '6.9.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '6.0.1'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '5.6.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
            build-root-suffix: -gradle-5
 | 
					 | 
				
			||||||
          - gradle: '5.2.1'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
            build-root-suffix: -gradle-5
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        java-version: ${{ matrix.java-version }}
 | 
					 | 
				
			||||||
    - name: Generate and submit dependencies
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        gradle-version: ${{ matrix.gradle }}
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-with-setup-gradle:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest # Test is not compatible with Windows
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
    - name: Generate and submit dependencies
 | 
					 | 
				
			||||||
      id: dependency-submission
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - name: Check and delete generated dependency graph
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.dependency-submission.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find generated dependency graph files"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        rm ${{ steps.dependency-submission.outputs.dependency-graph-file }}*
 | 
					 | 
				
			||||||
    - name: Run Gradle build
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - name: Check no dependency graph is generated
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -z "$(ls -A dependency-graph-reports)" ]; then
 | 
					 | 
				
			||||||
            echo "Expected no dependency graph files to be generated"
 | 
					 | 
				
			||||||
            ls -l dependency-graph-reports
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-with-includes-and-excludes:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest # Test is not compatible with Windows
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Generate and submit dependencies
 | 
					 | 
				
			||||||
      id: dependency-submission
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
        dependency-graph-exclude-projects: excluded-project
 | 
					 | 
				
			||||||
        dependency-graph-include-projects: included-project
 | 
					 | 
				
			||||||
        dependency-graph-exclude-configurations: excluded-configuration
 | 
					 | 
				
			||||||
        dependency-graph-include-configurations: included-configuration
 | 
					 | 
				
			||||||
    - name: Check generated dependency graph and env vars
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.dependency-submission.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find generated dependency graph file"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if [ "$DEPENDENCY_GRAPH_EXCLUDE_PROJECTS" != "excluded-project" ] || 
 | 
					 | 
				
			||||||
           [ "$DEPENDENCY_GRAPH_INCLUDE_PROJECTS" != "included-project" ] || 
 | 
					 | 
				
			||||||
           [ "$DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS" != "excluded-configuration" ] || 
 | 
					 | 
				
			||||||
           [ "$DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS" != "included-configuration" ]; then
 | 
					 | 
				
			||||||
            echo "Did not set expected environment variables"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-custom-report-dir-submit:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Generate dependency graph
 | 
					 | 
				
			||||||
      id: dependency-graph
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-submit
 | 
					 | 
				
			||||||
        dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
    - name: Check generated dependency graphs
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        echo "report file: ${{ steps.dependency-graph.outputs.dependency-graph-file }}"
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        if [ ! -e "${{ steps.dependency-graph.outputs.dependency-graph-file }}" ]; then
 | 
					 | 
				
			||||||
            echo "Did not find dependency graph file"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if [ -z "$(ls -A "${{ github.workspace }}/custom/report-dir")" ]; then
 | 
					 | 
				
			||||||
          echo "No dependency graph files found in custom directory"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-custom-report-dir-upload:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Generate and upload dependency graph
 | 
					 | 
				
			||||||
      id: dependency-graph
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: generate-and-upload
 | 
					 | 
				
			||||||
        dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  custom-report-dir-download-and-submit:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    needs: [dependency-submission-custom-report-dir-upload]
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Download and submit dependency graph
 | 
					 | 
				
			||||||
      uses: ./dependency-submission
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        dependency-graph: download-and-submit
 | 
					 | 
				
			||||||
        dependency-graph-report-dir: '${{ github.workspace }}/custom/report-dir'
 | 
					 | 
				
			||||||
        build-root-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      env: 
 | 
					 | 
				
			||||||
        DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: custom-report-dir-upload # For testing, to avoid downloading artifacts from other worklfows
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Check downloaded dependency graph
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ -z "$(ls -A "${{ github.workspace }}/custom/report-dir")" ]; then
 | 
					 | 
				
			||||||
          echo "No dependency graph files found in custom directory"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
@ -1,98 +0,0 @@
 | 
				
			|||||||
name: Test detect java toolchains
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  # Test that pre-installed runner JDKs are detected
 | 
					 | 
				
			||||||
  detect-toolchains-pre-installed-jdks:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
    - name: List detected toolchains
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: | 
 | 
					 | 
				
			||||||
        ./gradlew --info javaToolchains > output.txt
 | 
					 | 
				
			||||||
        cat output.txt
 | 
					 | 
				
			||||||
    - name: Verify detected toolchains
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: | 
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 8' output.txt || (echo "::error::Did not detect preinstalled JDK 8" && exit 1)
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that JDKs provisioned by setup-java are detected
 | 
					 | 
				
			||||||
  detect-toolchains-setup-java-jdks:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Java 16
 | 
					 | 
				
			||||||
      uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        distribution: 'temurin'
 | 
					 | 
				
			||||||
        java-version: 16
 | 
					 | 
				
			||||||
    - name: Setup Java 20
 | 
					 | 
				
			||||||
      uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        distribution: 'temurin'
 | 
					 | 
				
			||||||
        java-version: 20
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
    - name: List detected toolchains
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: | 
 | 
					 | 
				
			||||||
        ./gradlew --info javaToolchains > output.txt
 | 
					 | 
				
			||||||
        cat output.txt
 | 
					 | 
				
			||||||
    - name: Verify setup JDKs are detected
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: | 
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 16' output.txt || (echo "::error::Did not detect setup-java installed JDK 16" && exit 1)
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 20' output.txt || (echo "::error::Did not detect setup-java installed JDK 20" && exit 1)
 | 
					 | 
				
			||||||
    - name: Verify pre-installed toolchains are detected
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: | 
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 8' output.txt || (echo "::error::Did not detect preinstalled JDK 8" && exit 1)
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
 | 
					 | 
				
			||||||
        grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
 | 
					 | 
				
			||||||
							
								
								
									
										231
									
								
								.github/workflows/integ-test-inject-develocity.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										231
									
								
								.github/workflows/integ-test-inject-develocity.yml
									
									
									
									
										vendored
									
									
								
							@ -1,231 +0,0 @@
 | 
				
			|||||||
name: Test develocity injection
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
    secrets:
 | 
					 | 
				
			||||||
      DEVELOCITY_ACCESS_KEY:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  inject-develocity:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
        plugin-version: ['3.16.2', '4.2.2']
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          - java-version: 17
 | 
					 | 
				
			||||||
          - gradle: '8.14.3'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '7.6.2'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '6.9.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '5.6.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - plugin-version: '3.16.2'
 | 
					 | 
				
			||||||
            accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
 | 
					 | 
				
			||||||
          - plugin-version: '4.2.2'
 | 
					 | 
				
			||||||
            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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        java-version: ${{ matrix.java-version }}
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      id: setup-gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
        gradle-version: ${{ matrix.gradle }}
 | 
					 | 
				
			||||||
    - name: Run Gradle build
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/no-ge
 | 
					 | 
				
			||||||
      run: gradle help
 | 
					 | 
				
			||||||
    - name: Check Build Scan url
 | 
					 | 
				
			||||||
      if: ${{ !steps.gradle.outputs.build-scan-url }}
 | 
					 | 
				
			||||||
      uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        script: |
 | 
					 | 
				
			||||||
          core.setFailed('No Build Scan detected')
 | 
					 | 
				
			||||||
    - name: Check short lived token (DEVELOCITY_ACCESS_KEY)
 | 
					 | 
				
			||||||
      run: "[ ${#DEVELOCITY_ACCESS_KEY} -gt 500 ] || (echo 'DEVELOCITY_ACCESS_KEY does not look like a short lived token'; exit 1)"
 | 
					 | 
				
			||||||
    - name: Check short lived token (GRADLE_ENTERPRISE_ACCESS_KEY)
 | 
					 | 
				
			||||||
      run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  inject-develocity-with-access-key:
 | 
					 | 
				
			||||||
    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'
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
        plugin-version: ['3.16.2', '4.2.2']
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          - java-version: 17
 | 
					 | 
				
			||||||
          - gradle: '8.14.3'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '7.6.2'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '6.9.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '5.6.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Checkout sources
 | 
					 | 
				
			||||||
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
      - name: Initialize integ-test
 | 
					 | 
				
			||||||
        uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          java-version: ${{ matrix.java-version }}
 | 
					 | 
				
			||||||
      - name: Setup Gradle
 | 
					 | 
				
			||||||
        id: setup-gradle
 | 
					 | 
				
			||||||
        uses: ./setup-gradle
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
          gradle-version: ${{ matrix.gradle }}
 | 
					 | 
				
			||||||
          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
 | 
					 | 
				
			||||||
          develocity-token-expiry: 1
 | 
					 | 
				
			||||||
      - name: Run Gradle build
 | 
					 | 
				
			||||||
        id: gradle
 | 
					 | 
				
			||||||
        working-directory: .github/workflow-samples/no-ge
 | 
					 | 
				
			||||||
        run: gradle help
 | 
					 | 
				
			||||||
      - name: Check short lived token (DEVELOCITY_ACCESS_KEY)
 | 
					 | 
				
			||||||
        run: "[ ${#DEVELOCITY_ACCESS_KEY} -gt 500 ] || (echo 'DEVELOCITY_ACCESS_KEY does not look like a short lived token'; exit 1)"
 | 
					 | 
				
			||||||
      - name: Check short lived token (GRADLE_ENTERPRISE_ACCESS_KEY)
 | 
					 | 
				
			||||||
        run: "[ ${#GRADLE_ENTERPRISE_ACCESS_KEY} -gt 500 ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY does not look like a short lived token'; exit 1)"
 | 
					 | 
				
			||||||
      - name: Check Build Scan url
 | 
					 | 
				
			||||||
        if: ${{ !steps.gradle.outputs.build-scan-url }}
 | 
					 | 
				
			||||||
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          script: |
 | 
					 | 
				
			||||||
            core.setFailed('No Build Scan detected')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  inject-develocity-short-lived-token-failed:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      DEVELOCITY_INJECTION_ENABLED: true
 | 
					 | 
				
			||||||
      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', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
        plugin-version: [ '3.16.2', '4.2.2' ]
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          - java-version: 17
 | 
					 | 
				
			||||||
          - gradle: '8.14.3'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '7.6.2'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '6.9.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '5.6.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Checkout sources
 | 
					 | 
				
			||||||
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
      - name: Initialize integ-test
 | 
					 | 
				
			||||||
        uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          java-version: ${{ matrix.java-version }}
 | 
					 | 
				
			||||||
      - name: Setup Gradle
 | 
					 | 
				
			||||||
        id: setup-gradle
 | 
					 | 
				
			||||||
        uses: ./setup-gradle
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          gradle-version: ${{ matrix.gradle }}
 | 
					 | 
				
			||||||
          cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
 | 
					 | 
				
			||||||
      - name: Run Gradle build
 | 
					 | 
				
			||||||
        id: gradle
 | 
					 | 
				
			||||||
        working-directory: .github/workflow-samples/no-ge
 | 
					 | 
				
			||||||
        run: gradle help
 | 
					 | 
				
			||||||
      - name: Check access key is not blank (DEVELOCITY_ACCESS_KEY)
 | 
					 | 
				
			||||||
        run: "[ \"${DEVELOCITY_ACCESS_KEY}\" != \"\" ] || (echo 'using DEVELOCITY_ACCESS_KEY!'; exit 1)"
 | 
					 | 
				
			||||||
      - name: Check access key is not blank (GRADLE_ENTERPRISE_ACCESS_KEY)
 | 
					 | 
				
			||||||
        run: "[ \"${GRADLE_ENTERPRISE_ACCESS_KEY}\" != \"\" ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY is still supported in v3!'; exit 1)"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  inject-develocity-with-access-key-from-input-actions:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        gradle: ['current', '8.14.3', '7.6.2', '6.9.4', '5.6.4']
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
        plugin-version: [ '3.16.2', '4.2.2' ]
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          - java-version: 17
 | 
					 | 
				
			||||||
          - gradle: '8.14.3'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '7.6.2'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '6.9.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
          - gradle: '5.6.4'
 | 
					 | 
				
			||||||
            java-version: 11
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Checkout sources
 | 
					 | 
				
			||||||
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
      - name: Initialize integ-test
 | 
					 | 
				
			||||||
        uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          java-version: ${{ matrix.java-version }}
 | 
					 | 
				
			||||||
      - name: Setup Gradle
 | 
					 | 
				
			||||||
        id: setup-gradle
 | 
					 | 
				
			||||||
        uses: ./setup-gradle
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
          gradle-version: ${{ matrix.gradle }}
 | 
					 | 
				
			||||||
          develocity-injection-enabled: true
 | 
					 | 
				
			||||||
          develocity-url: 'https://ge.solutions-team.gradle.com'
 | 
					 | 
				
			||||||
          develocity-plugin-version: ${{ matrix.plugin-version }}
 | 
					 | 
				
			||||||
      - name: Run Gradle build
 | 
					 | 
				
			||||||
        id: gradle
 | 
					 | 
				
			||||||
        working-directory: .github/workflow-samples/no-ge
 | 
					 | 
				
			||||||
        run: gradle help
 | 
					 | 
				
			||||||
      - name: Check Build Scan url
 | 
					 | 
				
			||||||
        if: ${{ !steps.gradle.outputs.build-scan-url }}
 | 
					 | 
				
			||||||
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          script: |
 | 
					 | 
				
			||||||
            core.setFailed('No Build Scan detected')
 | 
					 | 
				
			||||||
@ -1,140 +0,0 @@
 | 
				
			|||||||
name: Test provision Gradle versions
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:   
 | 
					 | 
				
			||||||
  # Tests for executing with different Gradle versions. 
 | 
					 | 
				
			||||||
  # Each build verifies that it is executed with the expected Gradle version.
 | 
					 | 
				
			||||||
  provision-gradle:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        java-version: '11'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle with v6.9
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
        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'
 | 
					 | 
				
			||||||
    - name: Test uses Gradle v7.1.1
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/no-wrapper
 | 
					 | 
				
			||||||
      run: gradle help "-DgradleVersionCheck=7.1.1"
 | 
					 | 
				
			||||||
    # Configure JDK 17 for Gradle 9 and later
 | 
					 | 
				
			||||||
    - name: Setup Java
 | 
					 | 
				
			||||||
      uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        distribution: temurin
 | 
					 | 
				
			||||||
        java-version: 17
 | 
					 | 
				
			||||||
    - name: Setup Gradle with release-candidate
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        gradle-version: release-candidate
 | 
					 | 
				
			||||||
    - name: Test use release-candidate
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/no-wrapper
 | 
					 | 
				
			||||||
      run: gradle help
 | 
					 | 
				
			||||||
    - name: Setup Gradle with current
 | 
					 | 
				
			||||||
      id: gradle-current
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        gradle-version: current
 | 
					 | 
				
			||||||
    - name: Test use current
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/no-wrapper
 | 
					 | 
				
			||||||
      run: gradle help
 | 
					 | 
				
			||||||
    - name: Check current version output parameter
 | 
					 | 
				
			||||||
      if: ${{ !startsWith(steps.gradle-current.outputs.gradle-version , '9.') }}
 | 
					 | 
				
			||||||
      uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        script: |
 | 
					 | 
				
			||||||
          core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')    
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  provision-gradle-version:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        gradle: ['9.0.0', '8.14.2', '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: '9.0.0'
 | 
					 | 
				
			||||||
            java-version: 17
 | 
					 | 
				
			||||||
          - gradle: '5.6.4'
 | 
					 | 
				
			||||||
            build-root-suffix: -gradle-5
 | 
					 | 
				
			||||||
          - gradle: '4.10.3'
 | 
					 | 
				
			||||||
            build-root-suffix: -gradle-4
 | 
					 | 
				
			||||||
          - 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'
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Java
 | 
					 | 
				
			||||||
      uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        distribution: temurin
 | 
					 | 
				
			||||||
        java-version: ${{ matrix.java-version }}
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      id: setup-gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
        gradle-version: ${{ matrix.gradle }}
 | 
					 | 
				
			||||||
    - name: Check output parameter
 | 
					 | 
				
			||||||
      if: ${{ steps.setup-gradle.outputs.gradle-version != matrix.gradle }}
 | 
					 | 
				
			||||||
      uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        script: |
 | 
					 | 
				
			||||||
          core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.setup-gradle.outputs.gradle-version }}"')    
 | 
					 | 
				
			||||||
    - name: Run Gradle build
 | 
					 | 
				
			||||||
      id: gradle
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
 | 
					 | 
				
			||||||
      run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
 | 
					 | 
				
			||||||
    - name: Check Build Scan url
 | 
					 | 
				
			||||||
      if: ${{ !steps.gradle.outputs.build-scan-url }}
 | 
					 | 
				
			||||||
      uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        script: |
 | 
					 | 
				
			||||||
          core.setFailed('No Build Scan detected')    
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
   
 | 
					 | 
				
			||||||
@ -1,235 +0,0 @@
 | 
				
			|||||||
name: Test restore configuration-cache
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
    secrets:
 | 
					 | 
				
			||||||
      GRADLE_ENCRYPTION_KEY:
 | 
					 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  restore-cc-seed-build-groovy:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
        cache-write-only: true # Ensure we start with a clean cache entry
 | 
					 | 
				
			||||||
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
    - name: Groovy build with configuration-cache enabled
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: gradle test --configuration-cache
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-cc-verify-build-groovy:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
 | 
					 | 
				
			||||||
    needs: restore-cc-seed-build-groovy
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false
 | 
					 | 
				
			||||||
        cache-cleanup: on-success
 | 
					 | 
				
			||||||
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
    - name: Groovy build with configuration-cache enabled
 | 
					 | 
				
			||||||
      id: execute
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: gradle test --configuration-cache
 | 
					 | 
				
			||||||
    - name: Verify configuration-cache hit
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ -e ".github/workflow-samples/groovy-dsl/task-configured.txt" ]; then
 | 
					 | 
				
			||||||
            echo "Configuration cache was not used - task was configured unexpectedly"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Ensure that cache-cleanup doesn't remove all necessary files
 | 
					 | 
				
			||||||
  restore-cc-verify-no-cache-cleanup-groovy:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
 | 
					 | 
				
			||||||
    needs: restore-cc-verify-build-groovy
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
    - name: Groovy build with configuration-cache enabled
 | 
					 | 
				
			||||||
      id: execute
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: gradle test --configuration-cache
 | 
					 | 
				
			||||||
    - name: Verify configuration-cache hit
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ -e ".github/workflow-samples/groovy-dsl/task-configured.txt" ]; then
 | 
					 | 
				
			||||||
            echo "Configuration cache was not used - task was configured unexpectedly"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Check that the build can run when no extracted cache entries are restored
 | 
					 | 
				
			||||||
  restore-cc-gradle-user-home-not-fully-restored:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_x
 | 
					 | 
				
			||||||
    needs: restore-cc-seed-build-groovy
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle with no extracted cache entries restored
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      env: 
 | 
					 | 
				
			||||||
        GRADLE_BUILD_ACTION_SKIP_RESTORE: "generated-gradle-jars|wrapper-zips|java-toolchains|instrumented-jars|dependencies|kotlin-dsl"
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
    - name: Check execute Gradle build with configuration cache enabled (but not restored)
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: gradle test --configuration-cache
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-cc-seed-build-kotlin:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
        cache-write-only: true # Ensure we start with a clean cache entry
 | 
					 | 
				
			||||||
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
    - name: Execute 'help' with configuration-cache enabled
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: gradle help --configuration-cache
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-cc-modify-build-kotlin:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
 | 
					 | 
				
			||||||
    needs: restore-cc-seed-build-kotlin
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
    - name: Execute 'test' with configuration-cache enabled
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: gradle test --configuration-cache
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test restore configuration-cache from the third build invocation
 | 
					 | 
				
			||||||
  restore-cc-verify-build-kotlin:
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
 | 
					 | 
				
			||||||
      GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
 | 
					 | 
				
			||||||
    needs: restore-cc-modify-build-kotlin
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
        cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
    - name: Execute 'test' again with configuration-cache enabled
 | 
					 | 
				
			||||||
      id: execute
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: gradle test --configuration-cache
 | 
					 | 
				
			||||||
    - name: Verify configuration-cache hit
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ -e ".github/workflow-samples/kotlin-dsl/task-configured.txt" ]; then
 | 
					 | 
				
			||||||
            echo "Configuration cache was not used - task was configured unexpectedly"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
@ -1,55 +0,0 @@
 | 
				
			|||||||
name: Test restore custom Gradle Home
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  restore-containerized-seed-build:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    container: fedora:latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
 | 
					 | 
				
			||||||
  restore-containerized-dependencies-cache:
 | 
					 | 
				
			||||||
    needs: restore-containerized-seed-build
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    container: fedora:latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build with --offline
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test --offline
 | 
					 | 
				
			||||||
@ -1,83 +0,0 @@
 | 
				
			|||||||
name: Test restore custom Gradle Home
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  restore-custom-gradle-home-seed-build:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Set Gradle User Home
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        mkdir -p $GITHUB_WORKSPACE/gradle-user-home
 | 
					 | 
				
			||||||
        echo "GRADLE_USER_HOME=$GITHUB_WORKSPACE/gradle-user-home" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test --info
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
 | 
					 | 
				
			||||||
  restore-custom-gradle-home-dependencies-cache:
 | 
					 | 
				
			||||||
    needs: restore-custom-gradle-home-seed-build
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Set Gradle User Home
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        mkdir -p $GITHUB_WORKSPACE/gradle-user-home
 | 
					 | 
				
			||||||
        echo "GRADLE_USER_HOME=$GITHUB_WORKSPACE/gradle-user-home" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build with --offline
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test --offline --info
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that the gradle-user-home cache will cache and restore local build-cache
 | 
					 | 
				
			||||||
  restore-custom-gradle-home-build-cache:
 | 
					 | 
				
			||||||
    needs: restore-custom-gradle-home-seed-build
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Set Gradle User Home
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        mkdir -p $GITHUB_WORKSPACE/gradle-user-home
 | 
					 | 
				
			||||||
        echo "GRADLE_USER_HOME=$GITHUB_WORKSPACE/gradle-user-home" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build and verify tasks from cache
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test -DverifyCachedBuild=true --info
 | 
					 | 
				
			||||||
							
								
								
									
										156
									
								
								.github/workflows/integ-test-restore-gradle-home.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										156
									
								
								.github/workflows/integ-test-restore-gradle-home.yml
									
									
									
									
										vendored
									
									
								
							@ -1,156 +0,0 @@
 | 
				
			|||||||
name: Test restore Gradle Home
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  restore-gradle-home-seed-build:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
 | 
					 | 
				
			||||||
  restore-gradle-home-dependencies-cache:
 | 
					 | 
				
			||||||
    needs: restore-gradle-home-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build with --offline
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test --offline
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that the gradle-user-home cache will cache and restore local build-cache
 | 
					 | 
				
			||||||
  restore-gradle-home-build-cache:
 | 
					 | 
				
			||||||
    needs: restore-gradle-home-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build and verify tasks from cache
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test -DverifyCachedBuild=true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Check that the build can run when Gradle User Home is not fully restored
 | 
					 | 
				
			||||||
  restore-gradle-home-no-extracted-cache-entries-restored:
 | 
					 | 
				
			||||||
    needs: restore-gradle-home-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle with no extracted cache entries restored
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      env: 
 | 
					 | 
				
			||||||
        GRADLE_BUILD_ACTION_SKIP_RESTORE: "generated-gradle-jars|wrapper-zips|java-toolchains|instrumented-jars|dependencies|kotlin-dsl"
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Check executee Gradle build
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that a pre-existing gradle-user-home can be overwritten by the restored cache
 | 
					 | 
				
			||||||
  restore-gradle-home-pre-existing-gradle-home:
 | 
					 | 
				
			||||||
    needs: restore-gradle-home-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Pre-create Gradle User Home
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        mkdir -p ~/.gradle/caches
 | 
					 | 
				
			||||||
        touch ~/.gradle/gradle.properties
 | 
					 | 
				
			||||||
        touch ~/.gradle/caches/dummy.txt
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
        cache-overwrite-existing: true
 | 
					 | 
				
			||||||
    - name: Check that pre-existing content still exists
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ ! -e ~/.gradle/caches/dummy.txt ]; then
 | 
					 | 
				
			||||||
          echo "::error ::Should find dummy.txt after cache restore"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
        if [ ! -e ~/.gradle/gradle.properties ]; then
 | 
					 | 
				
			||||||
          echo "::error ::Should find gradle.properties after cache restore"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
    - name: Execute Gradle build with --offline
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/groovy-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew test --offline
 | 
					 | 
				
			||||||
@ -1,70 +0,0 @@
 | 
				
			|||||||
name: Test restore java toolchains
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  restore-java-toolchain-seed-build:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        java-version: '17'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
    - name: Build using Gradle wrapper
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/java-toolchain
 | 
					 | 
				
			||||||
      run: ./gradlew test --info
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Test that the gradle-user-home cache will cache the toolchain, by running build with --offline
 | 
					 | 
				
			||||||
  restore-java-toolchain-verify-build:
 | 
					 | 
				
			||||||
    needs: restore-java-toolchain-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        java-version: '17'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Execute Gradle build with --offline
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/java-toolchain
 | 
					 | 
				
			||||||
      run: ./gradlew test --info --offline
 | 
					 | 
				
			||||||
@ -1,65 +0,0 @@
 | 
				
			|||||||
name: Test sample Gradle Plugin project
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  sample-gradle-plugin-seed-build:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
    - name: Build gradle-plugin project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/gradle-plugin
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  sample-gradle-plugin-verify-build:
 | 
					 | 
				
			||||||
    needs: sample-gradle-plugin-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Build gradle-plugin project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/gradle-plugin
 | 
					 | 
				
			||||||
      run: ./gradlew build --offline
 | 
					 | 
				
			||||||
@ -1,65 +0,0 @@
 | 
				
			|||||||
name: Test sample Kotlin DSL project
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      cache-key-prefix:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '0'
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  sample-kotlin-dsl-seed-build:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: false # For testing, allow writing cache entries on non-default branches
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  sample-kotlin-dsl-verify-build:
 | 
					 | 
				
			||||||
    needs: sample-kotlin-dsl-seed-build
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      max-parallel: 1
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        cache-read-only: true
 | 
					 | 
				
			||||||
    - name: Build kotlin-dsl project
 | 
					 | 
				
			||||||
      working-directory: .github/workflow-samples/kotlin-dsl
 | 
					 | 
				
			||||||
      run: ./gradlew build --offline
 | 
					 | 
				
			||||||
							
								
								
									
										168
									
								
								.github/workflows/integ-test-wrapper-validation.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										168
									
								
								.github/workflows/integ-test-wrapper-validation.yml
									
									
									
									
										vendored
									
									
								
							@ -1,168 +0,0 @@
 | 
				
			|||||||
name: Test wrapper validation
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env:
 | 
					 | 
				
			||||||
  SKIP_DIST: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  wrapper-validation-setup-gradle:
 | 
					 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        os: ${{fromJSON(inputs.runner-os)}}
 | 
					 | 
				
			||||||
    runs-on: ${{ matrix.os }}
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Run wrapper-validation-action
 | 
					 | 
				
			||||||
      id: setup-gradle
 | 
					 | 
				
			||||||
      uses: ./setup-gradle
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        ALLOWED_GRADLE_WRAPPER_CHECKSUMS: ''
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Check failure
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ "${{ steps.setup-gradle.outcome}}" != "failure" ] ; then
 | 
					 | 
				
			||||||
          echo "Expected validation to fail, but it didn't"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wrapper-validation-success:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Run wrapper-validation-action
 | 
					 | 
				
			||||||
      id: action-test
 | 
					 | 
				
			||||||
      uses: ./wrapper-validation
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        # to allow the invalid wrapper jar present in test data
 | 
					 | 
				
			||||||
        allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
 | 
					 | 
				
			||||||
        min-wrapper-count: 10
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Check outcome
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        # Evaluate workflow expressions here as env variable values instead of inside shell script
 | 
					 | 
				
			||||||
        # below to not accidentally inject code into shell script or break its syntax
 | 
					 | 
				
			||||||
        FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
 | 
					 | 
				
			||||||
        FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == '' }}
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ "$FAILED_WRAPPERS_MATCHES" != "true" ] ; then
 | 
					 | 
				
			||||||
          echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wrapper-validation-error:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Run wrapper-validation-action
 | 
					 | 
				
			||||||
      id: action-test
 | 
					 | 
				
			||||||
      uses: ./wrapper-validation
 | 
					 | 
				
			||||||
      # Expected to fail; validated below
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Check outcome
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        # Evaluate workflow expressions here as env variable values instead of inside shell script
 | 
					 | 
				
			||||||
        # below to not accidentally inject code into shell script or break its syntax
 | 
					 | 
				
			||||||
        VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
 | 
					 | 
				
			||||||
        FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
 | 
					 | 
				
			||||||
        FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == 'sources/test/jest/wrapper-validation/data/invalid/gradle-wrapper.jar|sources/test/jest/wrapper-validation/data/invalid/gradlе-wrapper.jar' }}
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ "$VALIDATION_FAILED" != "true" ] ; then
 | 
					 | 
				
			||||||
          echo "Expected validation to fail, but it didn't"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if [ "$FAILED_WRAPPERS_MATCHES" != "true" ] ; then
 | 
					 | 
				
			||||||
          echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wrapper-validation-minimum-wrapper-count:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Run wrapper-validation-action
 | 
					 | 
				
			||||||
      id: action-test
 | 
					 | 
				
			||||||
      uses: ./wrapper-validation
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        # to allow the invalid wrapper jar present in test data
 | 
					 | 
				
			||||||
        allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
 | 
					 | 
				
			||||||
        min-wrapper-count: 11
 | 
					 | 
				
			||||||
      # Expected to fail; validated below
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Check outcome
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        # Evaluate workflow expressions here as env variable values instead of inside shell script
 | 
					 | 
				
			||||||
        # below to not accidentally inject code into shell script or break its syntax
 | 
					 | 
				
			||||||
        VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ "$VALIDATION_FAILED" != "true" ] ; then
 | 
					 | 
				
			||||||
          echo "Expected validation to fail, but it didn't"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wrapper-validation-zero-wrappers:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.2.2 # Checkout the repository with no wrappers
 | 
					 | 
				
			||||||
      with:
 | 
					 | 
				
			||||||
        sparse-checkout: |
 | 
					 | 
				
			||||||
          .github/actions
 | 
					 | 
				
			||||||
          dist
 | 
					 | 
				
			||||||
          wrapper-validation
 | 
					 | 
				
			||||||
    - name: Initialize integ-test
 | 
					 | 
				
			||||||
      uses: ./.github/actions/init-integ-test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Run wrapper-validation-action
 | 
					 | 
				
			||||||
      id: action-test
 | 
					 | 
				
			||||||
      uses: ./wrapper-validation
 | 
					 | 
				
			||||||
      # Expected to fail; validated below
 | 
					 | 
				
			||||||
      continue-on-error: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Check outcome
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        # Evaluate workflow expressions here as env variable values instead of inside shell script
 | 
					 | 
				
			||||||
        # below to not accidentally inject code into shell script or break its syntax
 | 
					 | 
				
			||||||
        VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
 | 
					 | 
				
			||||||
      shell: bash
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
        if [ "$VALIDATION_FAILED" != "true" ] ; then
 | 
					 | 
				
			||||||
          echo "Expected validation to fail, but it didn't"
 | 
					 | 
				
			||||||
          exit 1
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
							
								
								
									
										30
									
								
								.github/workflows/integTest-action-inputs.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/integTest-action-inputs.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					name: Test different action inputs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  action-inputs:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Invoke with multi-line arguments
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: |
 | 
				
			||||||
 | 
					            --configuration-cache
 | 
				
			||||||
 | 
					            --build-cache
 | 
				
			||||||
 | 
					            -DsystemProperty=FOO
 | 
				
			||||||
 | 
					            -PgradleProperty=BAR
 | 
				
			||||||
 | 
					            test
 | 
				
			||||||
 | 
					            jar
 | 
				
			||||||
							
								
								
									
										75
									
								
								.github/workflows/integTest-caching-config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								.github/workflows/integTest-caching-config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,75 @@
 | 
				
			|||||||
 | 
					name: Test caching configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  # Run initial Gradle builds to push initial cache entries
 | 
				
			||||||
 | 
					  # These builds should start fresh without cache hits, due to the seed injected into the cache key above.
 | 
				
			||||||
 | 
					  seed-build:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Build using Gradle wrapper
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test
 | 
				
			||||||
 | 
					        # Add "wrapper" to main cache entry and remove 'wrapper-zips' bundle
 | 
				
			||||||
 | 
					        # Exclude build-cache from main cache entry
 | 
				
			||||||
 | 
					        gradle-home-cache-includes: |
 | 
				
			||||||
 | 
					            caches
 | 
				
			||||||
 | 
					            notifications
 | 
				
			||||||
 | 
					            wrapper
 | 
				
			||||||
 | 
					        gradle-home-cache-excludes: |
 | 
				
			||||||
 | 
					            caches/build-cache-1
 | 
				
			||||||
 | 
					        gradle-home-cache-artifact-bundles: |
 | 
				
			||||||
 | 
					            [
 | 
				
			||||||
 | 
					              ["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
 | 
				
			||||||
 | 
					              ["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
 | 
				
			||||||
 | 
					              ["instrumented-jars", "caches/jars-*/*/"],
 | 
				
			||||||
 | 
					              ["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
 | 
				
			||||||
 | 
					  verify-build:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build with --offline
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test --offline
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
 | 
					        # Need the same configuration when restoring state from cache
 | 
				
			||||||
 | 
					        gradle-home-cache-includes: |
 | 
				
			||||||
 | 
					            caches
 | 
				
			||||||
 | 
					            notifications
 | 
				
			||||||
 | 
					            wrapper
 | 
				
			||||||
 | 
					        gradle-home-cache-excludes: |
 | 
				
			||||||
 | 
					            caches/build-cache-1
 | 
				
			||||||
 | 
					        gradle-home-cache-artifact-bundles: |
 | 
				
			||||||
 | 
					            [
 | 
				
			||||||
 | 
					              ["generated-gradle-jars", "caches/*/generated-gradle-jars/*.jar"],
 | 
				
			||||||
 | 
					              ["dependencies", "caches/modules-*/files-*/*/*/*/*/"],
 | 
				
			||||||
 | 
					              ["instrumented-jars", "caches/jars-*/*/"],
 | 
				
			||||||
 | 
					              ["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										65
									
								
								.github/workflows/integTest-caching-configuration-cache.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								.github/workflows/integTest-caching-configuration-cache.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,65 @@
 | 
				
			|||||||
 | 
					name: Test save/restore configuration-cache state
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  # Run initial Gradle builds to push initial cache entries
 | 
				
			||||||
 | 
					  # These builds should start fresh without cache hits, due to the seed injected into the cache key above.
 | 
				
			||||||
 | 
					  seed-build:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Build with configuration-cache enabled
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test --configuration-cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Test that the project-dot-gradle cache will cache and restore configuration-cache
 | 
				
			||||||
 | 
					  configuration-cache:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build and verify cached configuration
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      env: 
 | 
				
			||||||
 | 
					        VERIFY_CACHED_CONFIGURATION: true
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test --configuration-cache
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Check that the build can run when no bundles are restored
 | 
				
			||||||
 | 
					  no-bundles-restored:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build with no cache artifact bundles restored
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test --configuration-cache
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
 | 
					        gradle-home-cache-artifact-bundles: '[]'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										79
									
								
								.github/workflows/integTest-caching-gradle-home.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								.github/workflows/integTest-caching-gradle-home.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,79 @@
 | 
				
			|||||||
 | 
					name: Test save/restore Gradle Home directory
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  # Run initial Gradle builds to push initial cache entries
 | 
				
			||||||
 | 
					  # These builds should start fresh without cache hits, due to the seed injected into the cache key above.
 | 
				
			||||||
 | 
					  seed-build:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Build using Gradle wrapper
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
 | 
				
			||||||
 | 
					  dependencies-cache:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build with --offline
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test --offline
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Test that the gradle-user-home cache will cache and restore local build-cache
 | 
				
			||||||
 | 
					  build-cache:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build and verify tasks from cache
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test -DverifyCachedBuild=true
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Check that the build can run when no bundles are restored
 | 
				
			||||||
 | 
					  no-bundles-restored:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build with no cache artifact bundles restored
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
 | 
					        gradle-home-cache-artifact-bundles: '[]'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										107
									
								
								.github/workflows/integTest-execution.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										107
									
								
								.github/workflows/integTest-execution.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,107 @@
 | 
				
			|||||||
 | 
					name: Test Gradle execution
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:   
 | 
				
			||||||
 | 
					  # Tests for executing with different Gradle versions. 
 | 
				
			||||||
 | 
					  # Each build verifies that it is executed with the expected Gradle version.
 | 
				
			||||||
 | 
					  gradle-execution:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					        include:
 | 
				
			||||||
 | 
					          - os: windows-latest
 | 
				
			||||||
 | 
					            script-suffix: '.bat'
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Test use defined Gradle version
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-version: 6.9
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper
 | 
				
			||||||
 | 
					        arguments: help -DgradleVersionCheck=6.9
 | 
				
			||||||
 | 
					    - name: Test use Gradle version alias
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-version: release-candidate
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper
 | 
				
			||||||
 | 
					        arguments: help
 | 
				
			||||||
 | 
					    - name: Test use defined Gradle executable
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-executable: __tests__/samples/groovy-dsl/gradlew${{ matrix.script-suffix }}
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper
 | 
				
			||||||
 | 
					        arguments: help -DgradleVersionCheck=7.1.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  gradle-versions:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					        include:
 | 
				
			||||||
 | 
					          - os: windows-latest
 | 
				
			||||||
 | 
					            script-suffix: '.bat'
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Test Gradle 7
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      id: gradle7
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-version: 7.2
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper
 | 
				
			||||||
 | 
					        arguments: help -DgradleVersionCheck=7.2
 | 
				
			||||||
 | 
					    - name: Check Gradle 7 scan
 | 
				
			||||||
 | 
					      if: ${{ !steps.gradle7.outputs.build-scan-url }}
 | 
				
			||||||
 | 
					      uses: actions/github-script@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        script: |
 | 
				
			||||||
 | 
					          core.setFailed('No build scan detected')    
 | 
				
			||||||
 | 
					    - name: Test Gradle 6
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      id: gradle6
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-version: 6.9
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper
 | 
				
			||||||
 | 
					        arguments: help -DgradleVersionCheck=6.9
 | 
				
			||||||
 | 
					    - name: Check Gradle 6 scan
 | 
				
			||||||
 | 
					      if: ${{ !steps.gradle6.outputs.build-scan-url }}
 | 
				
			||||||
 | 
					      uses: actions/github-script@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        script: |
 | 
				
			||||||
 | 
					          core.setFailed('No build scan detected')    
 | 
				
			||||||
 | 
					    - name: Test Gradle 5
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      id: gradle5
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-version: 5.6.4
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper-gradle-5
 | 
				
			||||||
 | 
					        arguments: help -DgradleVersionCheck=5.6.4
 | 
				
			||||||
 | 
					    - name: Check Gradle 5 scan
 | 
				
			||||||
 | 
					      if: ${{ !steps.gradle5.outputs.build-scan-url }}
 | 
				
			||||||
 | 
					      uses: actions/github-script@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        script: |
 | 
				
			||||||
 | 
					          core.setFailed('No build scan detected')    
 | 
				
			||||||
 | 
					    - name: Test Gradle 4
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      id: gradle4
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-version: 4.10.3
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/no-wrapper-gradle-4
 | 
				
			||||||
 | 
					        arguments: help -DgradleVersionCheck=4.10.3
 | 
				
			||||||
 | 
					    - name: Check Gradle 4 scan
 | 
				
			||||||
 | 
					      if: ${{ !steps.gradle4.outputs.build-scan-url }}
 | 
				
			||||||
 | 
					      uses: actions/github-script@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        script: |
 | 
				
			||||||
 | 
					          core.setFailed('No build scan detected')    
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
							
								
								
									
										61
									
								
								.github/workflows/integTest-gradle-user-home.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								.github/workflows/integTest-gradle-user-home.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,61 @@
 | 
				
			|||||||
 | 
					name: Test caching with a custom GRADLE_USER_HOME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					  GRADLE_USER_HOME: custom/gradle/home
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  # Run initial Gradle builds to push initial cache entries
 | 
				
			||||||
 | 
					  # These builds should start fresh without cache hits, due to the seed injected into the cache key above.
 | 
				
			||||||
 | 
					  seed-build:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Build using Gradle wrapper
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Test that the gradle-user-home cache will cache dependencies, by running build with --offline
 | 
				
			||||||
 | 
					  dependencies-cache:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build with --offline
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test --offline
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Test that the gradle-user-home cache will cache and restore local build-cache
 | 
				
			||||||
 | 
					  build-cache:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Execute Gradle build and verify tasks from cache
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/groovy-dsl
 | 
				
			||||||
 | 
					        arguments: test -DverifyCachedBuild=true
 | 
				
			||||||
 | 
					        cache-read-only: true
 | 
				
			||||||
							
								
								
									
										42
									
								
								.github/workflows/integTest-kotlin-dsl.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								.github/workflows/integTest-kotlin-dsl.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,42 @@
 | 
				
			|||||||
 | 
					name: Test caching with Kotlin DSL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  # Use kotlin-dsl project to verify caching of generated jars and compiled scripts
 | 
				
			||||||
 | 
					  seed-build:
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Build kotlin-dsl project
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/kotlin-dsl
 | 
				
			||||||
 | 
					        arguments: test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Check that the build can run --offline
 | 
				
			||||||
 | 
					  verify-build:
 | 
				
			||||||
 | 
					    needs: seed-build
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout sources
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - name: Build kotlin-dsl project
 | 
				
			||||||
 | 
					      uses: ./
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        build-root-directory: __tests__/samples/kotlin-dsl
 | 
				
			||||||
 | 
					        arguments: test --offline
 | 
				
			||||||
							
								
								
									
										55
									
								
								.github/workflows/suite-integ-test-caching.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										55
									
								
								.github/workflows/suite-integ-test-caching.yml
									
									
									
									
										vendored
									
									
								
							@ -1,55 +0,0 @@
 | 
				
			|||||||
name: suite-integ-test-caching
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  cache-cleanup:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-cache-cleanup.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  caching-config:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-caching-config.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-configuration-cache:
 | 
					 | 
				
			||||||
    if: ${{ ! github.event.pull_request.head.repo.fork }}
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
    secrets:
 | 
					 | 
				
			||||||
      GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-containerized-gradle-home:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-custom-gradle-home:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-gradle-home:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-restore-gradle-home.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  restore-java-toolchain:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
							
								
								
									
										85
									
								
								.github/workflows/suite-integ-test-other.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										85
									
								
								.github/workflows/suite-integ-test-other.yml
									
									
									
									
										vendored
									
									
								
							@ -1,85 +0,0 @@
 | 
				
			|||||||
name: suite-integ-test-other
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  workflow_call:
 | 
					 | 
				
			||||||
    inputs:
 | 
					 | 
				
			||||||
      runner-os:
 | 
					 | 
				
			||||||
        type: string
 | 
					 | 
				
			||||||
        default: '["ubuntu-latest"]'
 | 
					 | 
				
			||||||
      skip-dist:
 | 
					 | 
				
			||||||
        type: boolean
 | 
					 | 
				
			||||||
        default: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  build-scan-publish:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-build-scan-publish.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-graph:
 | 
					 | 
				
			||||||
    if: ${{ ! github.event.pull_request.head.repo.fork }}
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-dependency-graph.yml
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission:
 | 
					 | 
				
			||||||
    if: ${{ ! github.event.pull_request.head.repo.fork }}
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-dependency-submission.yml
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  dependency-submission-failures:
 | 
					 | 
				
			||||||
    if: ${{ ! github.event.pull_request.head.repo.fork }}
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  develocity-injection:
 | 
					 | 
				
			||||||
    if: ${{ ! github.event.pull_request.head.repo.fork }}
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-inject-develocity.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
    secrets:
 | 
					 | 
				
			||||||
      DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  provision-gradle-versions:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  sample-kotlin-dsl:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  sample-gradle-plugin:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  toolchain-detection:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-detect-toolchains.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  wrapper-validation:
 | 
					 | 
				
			||||||
    uses: ./.github/workflows/integ-test-wrapper-validation.yml
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      runner-os: '${{ inputs.runner-os }}'
 | 
					 | 
				
			||||||
      skip-dist: ${{ inputs.skip-dist }}
 | 
					 | 
				
			||||||
							
								
								
									
										94
									
								
								.github/workflows/update-checksums-file.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										94
									
								
								.github/workflows/update-checksums-file.js
									
									
									
									
										vendored
									
									
								
							@ -1,94 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * Updates the `wrapper-checksums.json` file
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This is intended to be executed by the GitHub workflow, but can also be run
 | 
					 | 
				
			||||||
 * manually.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// @ts-check
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const httpm = require('../../sources/node_modules/@actions/http-client')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const path = require('path')
 | 
					 | 
				
			||||||
const fs = require('fs')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * @returns {Promise<void>}
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
async function main() {
 | 
					 | 
				
			||||||
  const httpc = new httpm.HttpClient(
 | 
					 | 
				
			||||||
    'gradle/wrapper-validation-action/update-checksums-workflow',
 | 
					 | 
				
			||||||
    undefined,
 | 
					 | 
				
			||||||
    {allowRetries: true, maxRetries: 3}
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * @param {string} url
 | 
					 | 
				
			||||||
   * @returns {Promise<string>}
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  async function httpGetText(url) {
 | 
					 | 
				
			||||||
    const response = await httpc.get(url)
 | 
					 | 
				
			||||||
    return await response.readBody()
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * @typedef {Object} ApiVersionEntry
 | 
					 | 
				
			||||||
   * @property {string} version - version name
 | 
					 | 
				
			||||||
   * @property {string=} wrapperChecksumUrl - wrapper checksum URL; not present for old versions
 | 
					 | 
				
			||||||
   * @property {boolean} snapshot - whether this is a snapshot version
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * @returns {Promise<ApiVersionEntry[]>}
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  async function httpGetVersions() {
 | 
					 | 
				
			||||||
    return JSON.parse(
 | 
					 | 
				
			||||||
      await httpGetText('https://services.gradle.org/versions/all')
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const versions = (await httpGetVersions())
 | 
					 | 
				
			||||||
    // Only include versions with checksum
 | 
					 | 
				
			||||||
    .filter(e => e.wrapperChecksumUrl !== undefined)
 | 
					 | 
				
			||||||
    // Ignore snapshots; they are changing frequently so no point in including them in checksums file
 | 
					 | 
				
			||||||
    .filter(e => !e.snapshot)
 | 
					 | 
				
			||||||
  console.info(`Got ${versions.length} relevant Gradle versions`)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Note: For simplicity don't sort the entries but keep the order from the API; this also has the
 | 
					 | 
				
			||||||
  // advantage that the latest versions come first, so compared to appending versions at the end
 | 
					 | 
				
			||||||
  // this will not cause redundant Git diff due to trailing `,` being forbidden by JSON
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * @typedef {Object} FileVersionEntry
 | 
					 | 
				
			||||||
   * @property {string} version
 | 
					 | 
				
			||||||
   * @property {string} checksum
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  /** @type {FileVersionEntry[]} */
 | 
					 | 
				
			||||||
  const fileVersions = []
 | 
					 | 
				
			||||||
  for (const entry of versions) {
 | 
					 | 
				
			||||||
    /** @type {string} */
 | 
					 | 
				
			||||||
    // @ts-ignore
 | 
					 | 
				
			||||||
    const checksumUrl = entry.wrapperChecksumUrl
 | 
					 | 
				
			||||||
    const checksum = await httpGetText(checksumUrl)
 | 
					 | 
				
			||||||
    fileVersions.push({version: entry.version, checksum})
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const jsonPath = path.resolve(
 | 
					 | 
				
			||||||
    __dirname,
 | 
					 | 
				
			||||||
    '..',
 | 
					 | 
				
			||||||
    '..',
 | 
					 | 
				
			||||||
    'sources',
 | 
					 | 
				
			||||||
    'src',
 | 
					 | 
				
			||||||
    'wrapper-validation',
 | 
					 | 
				
			||||||
    'wrapper-checksums.json'
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
  console.info(`Writing checksums file to ${jsonPath}`)
 | 
					 | 
				
			||||||
  // Write pretty-printed JSON (and add trailing line break)
 | 
					 | 
				
			||||||
  fs.writeFileSync(jsonPath, JSON.stringify(fileVersions, null, 2) + '\n')
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
main().catch(e => {
 | 
					 | 
				
			||||||
  console.error(e)
 | 
					 | 
				
			||||||
  // Manually set error exit code, otherwise error is logged but script exits successfully
 | 
					 | 
				
			||||||
  process.exitCode = 1
 | 
					 | 
				
			||||||
})
 | 
					 | 
				
			||||||
							
								
								
									
										68
									
								
								.github/workflows/update-checksums-file.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										68
									
								
								.github/workflows/update-checksums-file.yml
									
									
									
									
										vendored
									
									
								
							@ -1,68 +0,0 @@
 | 
				
			|||||||
name: 'Update Wrapper checksums file'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  # Run weekly (at arbitrary time)
 | 
					 | 
				
			||||||
  schedule:
 | 
					 | 
				
			||||||
    - cron: '24 5 * * 6'
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  update-checksums:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: write
 | 
					 | 
				
			||||||
      pull-requests: write
 | 
					 | 
				
			||||||
    name: Update checksums
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Checkout
 | 
					 | 
				
			||||||
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Set up Node.js
 | 
					 | 
				
			||||||
        uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          node-version: 20
 | 
					 | 
				
			||||||
          cache: npm
 | 
					 | 
				
			||||||
          cache-dependency-path: sources/package-lock.json
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Install dependencies
 | 
					 | 
				
			||||||
        run: |
 | 
					 | 
				
			||||||
          npm clean-install typed-rest-client@1.8.11 --no-save
 | 
					 | 
				
			||||||
        working-directory: sources
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Update checksums file
 | 
					 | 
				
			||||||
        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>
 | 
					 | 
				
			||||||
          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
 | 
					 | 
				
			||||||
          # https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
 | 
					 | 
				
			||||||
          # Therefore suggest below to close and then reopen the PR
 | 
					 | 
				
			||||||
          body: |
 | 
					 | 
				
			||||||
            Automatically generated pull request to update the known wrapper checksums.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            In case of conflicts, manually run the workflow from the [Actions tab](https://github.com/gradle/actions/actions/workflows/update-checksums-file.yml), the changes will then be force-pushed onto this pull request branch.
 | 
					 | 
				
			||||||
            Do not manually update the pull request branch; those changes might get overwritten.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            > [!IMPORTANT]  
 | 
					 | 
				
			||||||
            > GitHub workflows have not been executed for this pull request yet. Before merging, close and then directly reopen this pull request to trigger the workflows.
 | 
					 | 
				
			||||||
							
								
								
									
										108
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										108
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -1,2 +1,106 @@
 | 
				
			|||||||
.git
 | 
					# Dependency directory
 | 
				
			||||||
.vscode
 | 
					node_modules
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
 | 
				
			||||||
 | 
					# Logs
 | 
				
			||||||
 | 
					logs
 | 
				
			||||||
 | 
					*.log
 | 
				
			||||||
 | 
					npm-debug.log*
 | 
				
			||||||
 | 
					yarn-debug.log*
 | 
				
			||||||
 | 
					yarn-error.log*
 | 
				
			||||||
 | 
					lerna-debug.log*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Diagnostic reports (https://nodejs.org/api/report.html)
 | 
				
			||||||
 | 
					report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Runtime data
 | 
				
			||||||
 | 
					pids
 | 
				
			||||||
 | 
					*.pid
 | 
				
			||||||
 | 
					*.seed
 | 
				
			||||||
 | 
					*.pid.lock
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Directory for instrumented libs generated by jscoverage/JSCover
 | 
				
			||||||
 | 
					lib-cov
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Coverage directory used by tools like istanbul
 | 
				
			||||||
 | 
					coverage
 | 
				
			||||||
 | 
					*.lcov
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# nyc test coverage
 | 
				
			||||||
 | 
					.nyc_output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
 | 
				
			||||||
 | 
					.grunt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Bower dependency directory (https://bower.io/)
 | 
				
			||||||
 | 
					bower_components
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# node-waf configuration
 | 
				
			||||||
 | 
					.lock-wscript
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Compiled binary addons (https://nodejs.org/api/addons.html)
 | 
				
			||||||
 | 
					build/Release
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Dependency directories
 | 
				
			||||||
 | 
					jspm_packages/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# TypeScript v1 declaration files
 | 
				
			||||||
 | 
					typings/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# TypeScript cache
 | 
				
			||||||
 | 
					*.tsbuildinfo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Optional npm cache directory
 | 
				
			||||||
 | 
					.npm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Optional eslint cache
 | 
				
			||||||
 | 
					.eslintcache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Optional REPL history
 | 
				
			||||||
 | 
					.node_repl_history
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Output of 'npm pack'
 | 
				
			||||||
 | 
					*.tgz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Yarn Integrity file
 | 
				
			||||||
 | 
					.yarn-integrity
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# dotenv environment variables file
 | 
				
			||||||
 | 
					.env
 | 
				
			||||||
 | 
					.env.test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# parcel-bundler cache (https://parceljs.org/)
 | 
				
			||||||
 | 
					.cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# next.js build output
 | 
				
			||||||
 | 
					.next
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# nuxt.js build output
 | 
				
			||||||
 | 
					.nuxt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# vuepress build output
 | 
				
			||||||
 | 
					.vuepress/dist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Serverless directories
 | 
				
			||||||
 | 
					.serverless/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# FuseBox cache
 | 
				
			||||||
 | 
					.fusebox/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# DynamoDB Local files
 | 
				
			||||||
 | 
					.dynamodb/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# OS metadata
 | 
				
			||||||
 | 
					.DS_Store
 | 
				
			||||||
 | 
					Thumbs.db
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Ignore built ts files
 | 
				
			||||||
 | 
					__tests__/runner/*
 | 
				
			||||||
 | 
					# lib/**/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# IntelliJ IDEA config files
 | 
				
			||||||
 | 
					.idea/
 | 
				
			||||||
 | 
					*.iml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# ASDF tool configuration
 | 
				
			||||||
 | 
					.tool-versions
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								.prettierignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.prettierignore
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					dist/
 | 
				
			||||||
 | 
					lib/
 | 
				
			||||||
 | 
					node_modules/
 | 
				
			||||||
@ -1,34 +0,0 @@
 | 
				
			|||||||
## Building
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The `build` script in the project root provides a convenient way to perform many local build tasks:
 | 
					 | 
				
			||||||
1. `./build` will lint and compile typescript sources
 | 
					 | 
				
			||||||
2. `./build all` will lint and compile typescript and run unit tests
 | 
					 | 
				
			||||||
3. `./build install` will install npm packages followed by lint and compile
 | 
					 | 
				
			||||||
4. `./build init-scripts` will run the init-script integration tests
 | 
					 | 
				
			||||||
5. `./build act <act-commands>` will run `act` after building local changes (see below)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Using `act` to run integ-test workflows locally
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
It's possible to run GitHub Actions workflows locally with https://nektosact.com/.
 | 
					 | 
				
			||||||
Many of the test workflows from this repository can be run in this way, making it easier to
 | 
					 | 
				
			||||||
test local changes without pushing to a branch.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
This feature is most useful to run a single `integ-test-*` workflow. Avoid running `ci-quick-test` or other aggregating workflows unless you want to use your local machine as a heater!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Example running a single workflow:
 | 
					 | 
				
			||||||
`./build act -W .github/workflows/integ-test-caching-config.yml`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Example running a single job:
 | 
					 | 
				
			||||||
`./build act -W .github/workflows/integ-test-caching-config.yml -j cache-disabled-pre-existing-gradle-home`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Known issues:
 | 
					 | 
				
			||||||
- `integ-test-detect-java-toolchains.yml` fails when running on a `linux/amd64` container, since the expected pre-installed JDKs are not present. Should be fixed by #89.
 | 
					 | 
				
			||||||
- `act` is not yet compatible with `actions/upload-artifact@v4` (or related toolkit functions)
 | 
					 | 
				
			||||||
    - See https://github.com/nektos/act/pull/2224
 | 
					 | 
				
			||||||
- Workflows run by `act` cannot submit to the dependency-submission API, as no `GITHUB_TOKEN` is available by default.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Tips:
 | 
					 | 
				
			||||||
- Add the following lines to `~/.actrc`:
 | 
					 | 
				
			||||||
    - `--container-daemon-socket -` : Prevents "error while creating mount source path", and yes that's a solitary dash at the end
 | 
					 | 
				
			||||||
    - `--matrix os:ubuntu-latest` : Avoids a lot of logging about unsupported runners being skipped
 | 
					 | 
				
			||||||
- Runners don't have `java` installed by default, so all workflows that run Gradle require a `setup-java` step.
 | 
					 | 
				
			||||||
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							@ -1,7 +1,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
The MIT License (MIT)
 | 
					The MIT License (MIT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Copyright (c) 2023 Gradle Inc.
 | 
					Copyright (c) 2018 GitHub, Inc. and contributors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
of this software and associated documentation files (the "Software"), to deal
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										367
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										367
									
								
								README.md
									
									
									
									
									
								
							@ -1,105 +1,292 @@
 | 
				
			|||||||
# GitHub Actions for Gradle builds
 | 
					# Execute Gradle builds in GitHub Actions workflows
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[](https://scorecard.dev/viewer/?uri=github.com/gradle/actions)
 | 
					This GitHub Action can be used to execute a Gradle build on any platform supported by GitHub Actions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This repository contains a set of GitHub Actions that are useful for building Gradle projects on GitHub.
 | 
					## Usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## The `setup-gradle` action
 | 
					The following workflow will run `./gradlew build` on ubuntu, macos and windows. 
 | 
				
			||||||
 | 
					The only prerequisite is to have Java installed: you define the version of Java you need to run the build using the `actions/setup-java` action.
 | 
				
			||||||
The `setup-gradle` action can be used to configure Gradle for optimal execution on any platform supported by GitHub Actions.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
This replaces the previous `gradle/gradle-build-action`, which now delegates to this implementation.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The recommended way to execute any Gradle build is with the help of the [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html), and the examples assume that the Gradle Wrapper has been configured for the project. See [this example](docs/setup-gradle.md#build-with-a-specific-gradle-version) if your project doesn't use the Gradle Wrapper.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
### Example usage
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
name: Build
 | 
					# .github/workflows/gradle-build-pr.yml
 | 
				
			||||||
 | 
					name: Run Gradle on PRs
 | 
				
			||||||
on:
 | 
					on: pull_request
 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  build:
 | 
					  gradle:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest, macos-latest, windows-latest]
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - name: Checkout sources
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
      uses: actions/checkout@v4
 | 
					    - uses: actions/setup-java@v1
 | 
				
			||||||
    - name: Setup Java
 | 
					 | 
				
			||||||
      uses: actions/setup-java@v4
 | 
					 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        distribution: 'temurin'
 | 
					        java-version: 11
 | 
				
			||||||
        java-version: 17
 | 
					    - uses: gradle/gradle-build-action@v2
 | 
				
			||||||
    - name: Setup Gradle
 | 
					 | 
				
			||||||
      uses: gradle/actions/setup-gradle@v5
 | 
					 | 
				
			||||||
    - name: Build with Gradle
 | 
					 | 
				
			||||||
      run: ./gradlew build
 | 
					 | 
				
			||||||
```
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
See the [full action documentation](docs/setup-gradle.md) for more advanced usage scenarios.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## The `dependency-submission` action
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Generates and submits a dependency graph for a Gradle project, allowing GitHub to alert about reported vulnerabilities in your project dependencies.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The following workflow will generate a dependency graph for a Gradle project and submit it immediately to the repository via the
 | 
					 | 
				
			||||||
Dependency Submission API. For most projects, this default configuration should be all that you need.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Simply add this as a new workflow file to your repository (eg `.github/workflows/dependency-submission.yml`).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
```yaml
 | 
					 | 
				
			||||||
name: Dependency Submission
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches: [ 'main' ]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: write
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  dependency-submission:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
    - name: Checkout sources
 | 
					 | 
				
			||||||
      uses: actions/checkout@v4
 | 
					 | 
				
			||||||
    - name: Setup Java
 | 
					 | 
				
			||||||
      uses: actions/setup-java@v4
 | 
					 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        distribution: 'temurin'
 | 
					        arguments: build
 | 
				
			||||||
        java-version: 17
 | 
					 | 
				
			||||||
    - name: Generate and submit dependency graph
 | 
					 | 
				
			||||||
      uses: gradle/actions/dependency-submission@v5
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
 | 
					It is possible to configure multiple Gradle executions to run sequentially in the same job. 
 | 
				
			||||||
 | 
					Each invocation will start its run with the filesystem state remaining from the previous execution.
 | 
				
			||||||
## The `wrapper-validation` action
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The `wrapper-validation` action validates the checksums of _all_ [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) JAR files present in the repository and fails if any unknown Gradle Wrapper JAR files are found.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Starting with v4 the `setup-gradle` action will [perform wrapper validation](docs/setup-gradle.md#gradle-wrapper-validation) on each execution.
 | 
					 | 
				
			||||||
If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
### Example workflow
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
name: "Validate Gradle Wrapper"
 | 
					- uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					  with:
 | 
				
			||||||
on:
 | 
					    arguments: assemble
 | 
				
			||||||
  push:
 | 
					- uses: gradle/gradle-build-action@v2
 | 
				
			||||||
  pull_request:
 | 
					  with:
 | 
				
			||||||
 | 
					    arguments: check
 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  validation:
 | 
					 | 
				
			||||||
    name: "Validation"
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - uses: actions/checkout@v4
 | 
					 | 
				
			||||||
      - uses: gradle/actions/wrapper-validation@v5
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.
 | 
					### Why is this better than running Gradle directly?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					It is possible to directly invoke Gradle in your workflow, and the `setup-java` action provides a simple way to cache Gradle dependencies. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					However, the `gradle-build-action` offers a number of advantages over this approach:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Easily [run the build with different versions of Gradle](#download-install-and-use-a-specific-gradle-version) using the `gradle-version` parameter. Gradle distributions are automatically downloaded and cached. 
 | 
				
			||||||
 | 
					- More sophisticated and more efficient caching of Gradle User Home between invocations, compared to `setup-java` and most custom configurations using `actions/cache`. [More details below](#caching).
 | 
				
			||||||
 | 
					- Detailed reporting of cache usage and cache configuration options allow you to [optimize the use of the GitHub actions cache](#optimizing-cache-effectiveness).
 | 
				
			||||||
 | 
					- [Automatic capture of build scan links](#build-scans) from the build, making these easier to locate for workflow run.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The `gradle-build-action` is designed to provide these benefits with minimal configuration. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Gradle Execution
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Command-line arguments
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The `arguments` input can used to pass arbitrary arguments to the `gradle` command line.
 | 
				
			||||||
 | 
					Arguments can be supplied in a single line, or as a multi-line input.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Here are some valid examples:
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					arguments: build
 | 
				
			||||||
 | 
					arguments: check --scan
 | 
				
			||||||
 | 
					arguments: some arbitrary tasks
 | 
				
			||||||
 | 
					arguments: build -PgradleProperty=foo
 | 
				
			||||||
 | 
					arguments: |
 | 
				
			||||||
 | 
					    build
 | 
				
			||||||
 | 
					    --scan
 | 
				
			||||||
 | 
					    -PgradleProperty=foo
 | 
				
			||||||
 | 
					    -DsystemProperty=bar
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					See `gradle --help` for more information.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you need to pass environment variables, use the GitHub Actions workflow syntax:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					- uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					  env:
 | 
				
			||||||
 | 
					    CI: true
 | 
				
			||||||
 | 
					  with:
 | 
				
			||||||
 | 
					    arguments: build
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Gradle build located in a subdirectory
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					By default, the action will execute Gradle in the root directory of your project. 
 | 
				
			||||||
 | 
					Use the `build-root-directory` input to target a Gradle build in a subdirectory.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					- uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					  with:
 | 
				
			||||||
 | 
					    build-root-directory: some/subdirectory
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Using a specific Gradle executable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The action will first look for a Gradle wrapper script in the root directory of your project. 
 | 
				
			||||||
 | 
					If not found, `gradle` will be executed from the PATH.
 | 
				
			||||||
 | 
					Use the `gradle-executable` input to execute using a specific Gradle installation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					 - uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					   with:
 | 
				
			||||||
 | 
					     gradle-executable: /path/to/installed/gradle
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This mechanism can also be used to target a Gradle wrapper script that is located in a non-default location.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Download, install and use a specific Gradle version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The `gradle-build-action` is able to download and install a specific Gradle version to execute.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					 - uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					   with:
 | 
				
			||||||
 | 
					     gradle-version: 6.5
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`gradle-version` can be set to any valid Gradle version.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Moreover, you can use the following aliases:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					| Alias | Selects |
 | 
				
			||||||
 | 
					| --- |---|
 | 
				
			||||||
 | 
					| `wrapper`           | The Gradle wrapper's version (default, useful for matrix builds) |
 | 
				
			||||||
 | 
					| `current`           | The current [stable release](https://gradle.org/install/) |
 | 
				
			||||||
 | 
					| `release-candidate` | The current [release candidate](https://gradle.org/release-candidate/) if any, otherwise fallback to `current` |
 | 
				
			||||||
 | 
					| `nightly`           | The latest [nightly](https://gradle.org/nightly/), fails if none. |
 | 
				
			||||||
 | 
					| `release-nightly`   | The latest [release nightly](https://gradle.org/release-nightly/), fails if none.      |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This can be handy to automatically verify your build works with the latest release candidate of Gradle:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					# .github/workflows/test-gradle-rc.yml
 | 
				
			||||||
 | 
					name: Test latest Gradle RC
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  schedule:
 | 
				
			||||||
 | 
					    - cron: 0 0 * * * # daily
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  gradle-rc:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - uses: actions/setup-java@v1
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        java-version: 11
 | 
				
			||||||
 | 
					    - uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        gradle-version: release-candidate
 | 
				
			||||||
 | 
					        arguments: build --dry-run # just test build configuration
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Caching
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					By default, this action aims to cache any and all reusable state that may be speed up a subsequent build invocation. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The state that is cached includes:
 | 
				
			||||||
 | 
					- Any distributions downloaded to satisfy a `gradle-version` parameter ;
 | 
				
			||||||
 | 
					- A subset of the Gradle User Home directory, including downloaded dependencies, wrapper distributions, and the local build cache ;
 | 
				
			||||||
 | 
					- Any [configuration-cache](https://docs.gradle.org/nightly/userguide/configuration_cache.html) data stored in the project `.gradle` directory.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					To reduce the space required for caching, this action makes a best effort to reduce duplication in cache entries.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Caching is enabled by default. You can disable caching for the action as follows:
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					cache-disabled: true
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Cache keys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For distributions downloaded to satisfy a `gradle-version` parametere are stored outside of Gradle User Home and cached separately. The cache key is unique to the downloaded distribution and will not change over time.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The state of the Gradle User Home and configuration-cache are highly dependent on the Gradle execution, so the cache key is composed of the current commit hash and the GitHub actions job id.
 | 
				
			||||||
 | 
					As such, the cache key is likely to change on each subsequent run of GitHub actions. 
 | 
				
			||||||
 | 
					This allows the most recent state to always be available in the GitHub actions cache.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					To reduce duplication between cache entries, certain artifacts are cached independently based on their identity.
 | 
				
			||||||
 | 
					Artifacts that are cached independently include downloaded dependencies, downloaded wrapper distributions and generated Gradle API jars.
 | 
				
			||||||
 | 
					For example, this means that all jobs executing a particular version of the Gradle wrapper will share common entries for wrapper distributions and for generated Gradle API jars.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Using the caches read-only
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In some circumstances, it makes sense for a Gradle invocation to read any existing cache entries but not to write changes back.
 | 
				
			||||||
 | 
					For example, you may want to write cache entries for builds on your `main` branch, but not for any PR build invocations.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can enable read-only caching for any of the caches as follows:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					# Only write to the cache for builds on the 'main' branch.
 | 
				
			||||||
 | 
					# Builds on other branches will only read existing entries from the cache.
 | 
				
			||||||
 | 
					cache-read-only: ${{ github.ref != 'refs/heads/main' }}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Gradle User Home cache tuning
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					As well as any wrapper distributions, the action will attempt to save and restore the `caches` and `notifications` directories from Gradle User Home.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The contents to be cached can be fine tuned by including and excluding certain paths with Gradle User Home.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					# Cache downloaded JDKs in addition to the default directories.
 | 
				
			||||||
 | 
					gradle-home-cache-includes: |
 | 
				
			||||||
 | 
					    caches
 | 
				
			||||||
 | 
					    notifications
 | 
				
			||||||
 | 
					    jdks
 | 
				
			||||||
 | 
					# Exclude the local build-cache from the directories cached.
 | 
				
			||||||
 | 
					gradle-home-cache-excludes: |
 | 
				
			||||||
 | 
					    caches/build-cache-1
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can specify any number of fixed paths or patterns to include or exclude. 
 | 
				
			||||||
 | 
					File pattern support is documented at https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#patterns-to-match-file-paths.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Cache debugging and analysis
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Gradle User Home state will be restored from the cache during the first `gradle-build-action` step for any workflow job. 
 | 
				
			||||||
 | 
					This state will be saved back to the cache at the end of the job, after all Gradle executions have completed.
 | 
				
			||||||
 | 
					A report of all cache entries restored and saved is printed to the action log when saving the cache entries. 
 | 
				
			||||||
 | 
					This report can provide valuable insignt into how much cache space is being used.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					It is possible to enable additional debug logging for cache operations. You do via the `GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED` environment variable:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Note that this setting will also prevent certain cache operations from running in parallel, further assisting with debugging.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Optimizing cache effectiveness
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Cache storage space for GitHub actions is limited, and writing new cache entries can trigger the deletion of exising entries.
 | 
				
			||||||
 | 
					Eviction of shared cache entries can reduce cache effectiveness, slowing down your `gradle-build-action` steps.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					There are a number of actions you can take if your cache use is less effective due to entry eviction.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### Only write to the cache from the default branch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GitHub cache entries are not shared between builds on different branches. This means that identical cache entries will be stored separately for different branches.
 | 
				
			||||||
 | 
					The exception to the is cache entries for the default (`master`/`main`) branch can be read by actions invoked for other branches.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					An easy way to reduce cache usage when you run builds on many different branches is to only permit your default branch to write to the cache,
 | 
				
			||||||
 | 
					with all other branch builds using `cache-read-only`. See [Using the caches read-only](#using-the-caches-read-only) for more details.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Similarly, you could use `cache-read-only` for certain jobs in the workflow, and instead have these jobs reuse the cache content from upstream jobs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### Exclude content from Gradle User Home cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Each build is different, and some builds produce more Gradle User Home content than others.
 | 
				
			||||||
 | 
					[Cache debugging ](#cache-debugging-and-analysis) can provide insight into which cache entries are the largest,
 | 
				
			||||||
 | 
					and you can selectively [exclude content using `gradle-home-cache-exclude`](#gradle-user-home-cache-tuning).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Build scans
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If your build publishes a [build scan](https://gradle.com/build-scans/) the `gradle-build-action` action will:
 | 
				
			||||||
 | 
					- Add a notice with the link to the GitHub Actions user interface
 | 
				
			||||||
 | 
					- Emit the link to the published build scan as an output named `build-scan-url`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can then use that link in subsequent actions of your workflow. For example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					# .github/workflows/gradle-build-pr.yml
 | 
				
			||||||
 | 
					name: Run Gradle on PRs
 | 
				
			||||||
 | 
					on: pull_request
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  gradle:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					    - uses: actions/setup-java@v1
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        java-version: 11
 | 
				
			||||||
 | 
					    - uses: gradle/gradle-build-action@v2
 | 
				
			||||||
 | 
					      id: gradle
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        arguments: build
 | 
				
			||||||
 | 
					    - name: "Comment build scan url"
 | 
				
			||||||
 | 
					      uses: actions/github-script@v3
 | 
				
			||||||
 | 
					      if: github.event_name == 'pull_request' && failure()
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        github-token: ${{secrets.GITHUB_TOKEN}}
 | 
				
			||||||
 | 
					        script: |
 | 
				
			||||||
 | 
					          github.issues.createComment({
 | 
				
			||||||
 | 
					            issue_number: context.issue.number,
 | 
				
			||||||
 | 
					            owner: context.repo.owner,
 | 
				
			||||||
 | 
					            repo: context.repo.repo,
 | 
				
			||||||
 | 
					            body: '❌ ${{ github.workflow }} failed: ${{ steps.gradle.outputs.build-scan-url }}'
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										32
									
								
								RELEASING.md
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								RELEASING.md
									
									
									
									
									
								
							@ -1,32 +0,0 @@
 | 
				
			|||||||
# Gradle GitHub Actions release process
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Preparation
 | 
					 | 
				
			||||||
- Push any outstanding changes to branch main.
 | 
					 | 
				
			||||||
- Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch.
 | 
					 | 
				
			||||||
  - This should include any workflows triggered by `[bot] Update dist directory`
 | 
					 | 
				
			||||||
- Decide on the version number to use for the release. The action releases should follow semantic versioning.
 | 
					 | 
				
			||||||
  - By default, a patch release is assumed (eg. `4.0.0` → `4.0.1`)
 | 
					 | 
				
			||||||
  - If new features have been added, bump the minor version (eg `4.1.1` → `4.2.0`)
 | 
					 | 
				
			||||||
  - If a new major release is required, bump the major version (eg `4.1.1` → `5.0.0`)
 | 
					 | 
				
			||||||
  - Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Release gradle/actions
 | 
					 | 
				
			||||||
- Create a tag for the release. The tag should have the format `v5.0.0`
 | 
					 | 
				
			||||||
  - From CLI: `git tag -s -m "v5.0.0" v5.0.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 `v5` 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 -s -a -m "v5.0.0" v5 v5.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
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release:
 | 
					 | 
				
			||||||
https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v4.0.0 update PR](https://github.com/actions/starter-workflows/pull/2468) for an example.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release:
 | 
					 | 
				
			||||||
https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v4.0.0 update PR](https://github.com/github/docs/pull/34239) for an example.
 | 
					 | 
				
			||||||
@ -1,13 +1,11 @@
 | 
				
			|||||||
import {describe, expect, it} from '@jest/globals'
 | 
					import {CacheEntryListener, CacheListener} from '../src/cache-base'
 | 
				
			||||||
 | 
					 | 
				
			||||||
import {CacheEntryListener, CacheListener} from '../../src/caching/cache-reporting'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('caching report', () => {
 | 
					describe('caching report', () => {
 | 
				
			||||||
    describe('reports not fully restored', () => {
 | 
					    describe('reports not fully restored', () => {
 | 
				
			||||||
        it('with one requested entry report', async () => {
 | 
					        it('with one requested entry report', async () => {
 | 
				
			||||||
            const report = new CacheListener()
 | 
					            const report = new CacheListener()
 | 
				
			||||||
            report.entry('foo').markRequested('1', ['2'])
 | 
					            report.entry('foo').markRequested('1', ['2'])
 | 
				
			||||||
            report.entry('bar').markRequested('3').markRestored('4', 500, 1000)
 | 
					            report.entry('bar').markRequested('3').markRestored('4', 500)
 | 
				
			||||||
            expect(report.fullyRestored).toBe(false)
 | 
					            expect(report.fullyRestored).toBe(false)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
@ -24,13 +22,13 @@ describe('caching report', () => {
 | 
				
			|||||||
        })
 | 
					        })
 | 
				
			||||||
        it('with restored entry report', async () => {
 | 
					        it('with restored entry report', async () => {
 | 
				
			||||||
            const report = new CacheListener()
 | 
					            const report = new CacheListener()
 | 
				
			||||||
            report.entry('bar').markRequested('3').markRestored('4', 300, 1000)
 | 
					            report.entry('bar').markRequested('3').markRestored('4', 300)
 | 
				
			||||||
            expect(report.fullyRestored).toBe(true)
 | 
					            expect(report.fullyRestored).toBe(true)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        it('with multiple restored entry reportss', async () => {
 | 
					        it('with multiple restored entry reportss', async () => {
 | 
				
			||||||
            const report = new CacheListener()
 | 
					            const report = new CacheListener()
 | 
				
			||||||
            report.entry('foo').markRestored('4', 3300, 111)
 | 
					            report.entry('foo').markRestored('4', 3300)
 | 
				
			||||||
            report.entry('bar').markRequested('3').markRestored('4', 333, 1000)
 | 
					            report.entry('bar').markRequested('3').markRestored('4', 333)
 | 
				
			||||||
            expect(report.fullyRestored).toBe(true)
 | 
					            expect(report.fullyRestored).toBe(true)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
@ -66,7 +64,7 @@ describe('caching report', () => {
 | 
				
			|||||||
            const report = new CacheListener()
 | 
					            const report = new CacheListener()
 | 
				
			||||||
            const entryReport = report.entry('foo')
 | 
					            const entryReport = report.entry('foo')
 | 
				
			||||||
            entryReport.markRequested('1', ['2', '3'])
 | 
					            entryReport.markRequested('1', ['2', '3'])
 | 
				
			||||||
            entryReport.markSaved('4', 100, 1000)
 | 
					            entryReport.markSaved('4', 100)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const stringRep = report.stringify()
 | 
					            const stringRep = report.stringify()
 | 
				
			||||||
            const reportClone: CacheListener = CacheListener.rehydrate(stringRep)
 | 
					            const reportClone: CacheListener = CacheListener.rehydrate(stringRep)
 | 
				
			||||||
@ -75,8 +73,6 @@ describe('caching report', () => {
 | 
				
			|||||||
            expect(entryClone.requestedKey).toBe('1')
 | 
					            expect(entryClone.requestedKey).toBe('1')
 | 
				
			||||||
            expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
 | 
					            expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
 | 
				
			||||||
            expect(entryClone.savedKey).toBe('4')
 | 
					            expect(entryClone.savedKey).toBe('4')
 | 
				
			||||||
            expect(entryClone.savedSize).toBe(100)
 | 
					 | 
				
			||||||
            expect(entryClone.savedTime).toBe(1000)
 | 
					 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        it('with live entry report', async () => {
 | 
					        it('with live entry report', async () => {
 | 
				
			||||||
            const report = new CacheListener()
 | 
					            const report = new CacheListener()
 | 
				
			||||||
@ -89,7 +85,7 @@ describe('caching report', () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            // Check type and call method on rehydrated entry report
 | 
					            // Check type and call method on rehydrated entry report
 | 
				
			||||||
            expect(entryClone).toBeInstanceOf(CacheEntryListener)
 | 
					            expect(entryClone).toBeInstanceOf(CacheEntryListener)
 | 
				
			||||||
            entryClone.markSaved('4', 100, 1000)
 | 
					            entryClone.markSaved('4', 100)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            expect(entryClone.requestedKey).toBe('1')
 | 
					            expect(entryClone.requestedKey).toBe('1')
 | 
				
			||||||
            expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
 | 
					            expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
 | 
				
			||||||
@ -1,6 +1,4 @@
 | 
				
			|||||||
import {describe, expect, it} from '@jest/globals'
 | 
					import * as cacheUtils from '../src/cache-utils'
 | 
				
			||||||
 | 
					 | 
				
			||||||
import * as cacheUtils from '../../src/caching/cache-utils'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('cacheUtils-utils', () => {
 | 
					describe('cacheUtils-utils', () => {
 | 
				
			||||||
    describe('can hash', () => {
 | 
					    describe('can hash', () => {
 | 
				
			||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
distributionBase=GRADLE_USER_HOME
 | 
					distributionBase=GRADLE_USER_HOME
 | 
				
			||||||
distributionPath=wrapper/dists
 | 
					distributionPath=wrapper/dists
 | 
				
			||||||
# Deliberately not using the latest Gradle version for cache cleanup testing
 | 
					distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
 | 
				
			||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
 | 
					 | 
				
			||||||
zipStoreBase=GRADLE_USER_HOME
 | 
					zipStoreBase=GRADLE_USER_HOME
 | 
				
			||||||
zipStorePath=wrapper/dists
 | 
					zipStorePath=wrapper/dists
 | 
				
			||||||
							
								
								
									
										11
									
								
								__tests__/data/crypto-utils-test/build.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								__tests__/data/crypto-utils-test/build.gradle
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					plugins {
 | 
				
			||||||
 | 
					    id 'java'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					repositories {
 | 
				
			||||||
 | 
					    mavenCentral()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dependencies {
 | 
				
			||||||
 | 
					    testImplementation('junit:junit:4.12')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							@ -1,8 +1,5 @@
 | 
				
			|||||||
distributionBase=GRADLE_USER_HOME
 | 
					distributionBase=GRADLE_USER_HOME
 | 
				
			||||||
distributionPath=wrapper/dists
 | 
					distributionPath=wrapper/dists
 | 
				
			||||||
distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
 | 
					distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
 | 
				
			||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
 | 
					 | 
				
			||||||
networkTimeout=10000
 | 
					 | 
				
			||||||
validateDistributionUrl=true
 | 
					 | 
				
			||||||
zipStoreBase=GRADLE_USER_HOME
 | 
					zipStoreBase=GRADLE_USER_HOME
 | 
				
			||||||
zipStorePath=wrapper/dists
 | 
					zipStorePath=wrapper/dists
 | 
				
			||||||
							
								
								
									
										185
									
								
								__tests__/data/crypto-utils-test/gradlew
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										185
									
								
								__tests__/data/crypto-utils-test/gradlew
									
									
									
									
										vendored
									
									
										Executable file
									
								
							@ -0,0 +1,185 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Copyright 2015 the original author or authors.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					# you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					# You may obtain a copy of the License at
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#      https://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					# distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					# See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					# limitations under the License.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##############################################################################
 | 
				
			||||||
 | 
					##
 | 
				
			||||||
 | 
					##  Gradle start up script for UN*X
 | 
				
			||||||
 | 
					##
 | 
				
			||||||
 | 
					##############################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Attempt to set APP_HOME
 | 
				
			||||||
 | 
					# Resolve links: $0 may be a link
 | 
				
			||||||
 | 
					PRG="$0"
 | 
				
			||||||
 | 
					# Need this for relative symlinks.
 | 
				
			||||||
 | 
					while [ -h "$PRG" ] ; do
 | 
				
			||||||
 | 
					    ls=`ls -ld "$PRG"`
 | 
				
			||||||
 | 
					    link=`expr "$ls" : '.*-> \(.*\)$'`
 | 
				
			||||||
 | 
					    if expr "$link" : '/.*' > /dev/null; then
 | 
				
			||||||
 | 
					        PRG="$link"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        PRG=`dirname "$PRG"`"/$link"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					SAVED="`pwd`"
 | 
				
			||||||
 | 
					cd "`dirname \"$PRG\"`/" >/dev/null
 | 
				
			||||||
 | 
					APP_HOME="`pwd -P`"
 | 
				
			||||||
 | 
					cd "$SAVED" >/dev/null
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					APP_NAME="Gradle"
 | 
				
			||||||
 | 
					APP_BASE_NAME=`basename "$0"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
 | 
				
			||||||
 | 
					DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Use the maximum available, or set MAX_FD != -1 to use that value.
 | 
				
			||||||
 | 
					MAX_FD="maximum"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					warn () {
 | 
				
			||||||
 | 
					    echo "$*"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					die () {
 | 
				
			||||||
 | 
					    echo
 | 
				
			||||||
 | 
					    echo "$*"
 | 
				
			||||||
 | 
					    echo
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# OS specific support (must be 'true' or 'false').
 | 
				
			||||||
 | 
					cygwin=false
 | 
				
			||||||
 | 
					msys=false
 | 
				
			||||||
 | 
					darwin=false
 | 
				
			||||||
 | 
					nonstop=false
 | 
				
			||||||
 | 
					case "`uname`" in
 | 
				
			||||||
 | 
					  CYGWIN* )
 | 
				
			||||||
 | 
					    cygwin=true
 | 
				
			||||||
 | 
					    ;;
 | 
				
			||||||
 | 
					  Darwin* )
 | 
				
			||||||
 | 
					    darwin=true
 | 
				
			||||||
 | 
					    ;;
 | 
				
			||||||
 | 
					  MINGW* )
 | 
				
			||||||
 | 
					    msys=true
 | 
				
			||||||
 | 
					    ;;
 | 
				
			||||||
 | 
					  NONSTOP* )
 | 
				
			||||||
 | 
					    nonstop=true
 | 
				
			||||||
 | 
					    ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Determine the Java command to use to start the JVM.
 | 
				
			||||||
 | 
					if [ -n "$JAVA_HOME" ] ; then
 | 
				
			||||||
 | 
					    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
 | 
				
			||||||
 | 
					        # IBM's JDK on AIX uses strange locations for the executables
 | 
				
			||||||
 | 
					        JAVACMD="$JAVA_HOME/jre/sh/java"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        JAVACMD="$JAVA_HOME/bin/java"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    if [ ! -x "$JAVACMD" ] ; then
 | 
				
			||||||
 | 
					        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||||
 | 
					location of your Java installation."
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    JAVACMD="java"
 | 
				
			||||||
 | 
					    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||||
 | 
					location of your Java installation."
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Increase the maximum file descriptors if we can.
 | 
				
			||||||
 | 
					if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
 | 
				
			||||||
 | 
					    MAX_FD_LIMIT=`ulimit -H -n`
 | 
				
			||||||
 | 
					    if [ $? -eq 0 ] ; then
 | 
				
			||||||
 | 
					        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
 | 
				
			||||||
 | 
					            MAX_FD="$MAX_FD_LIMIT"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					        ulimit -n $MAX_FD
 | 
				
			||||||
 | 
					        if [ $? -ne 0 ] ; then
 | 
				
			||||||
 | 
					            warn "Could not set maximum file descriptor limit: $MAX_FD"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# For Darwin, add options to specify how the application appears in the dock
 | 
				
			||||||
 | 
					if $darwin; then
 | 
				
			||||||
 | 
					    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# For Cygwin or MSYS, switch paths to Windows format before running java
 | 
				
			||||||
 | 
					if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
 | 
				
			||||||
 | 
					    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
 | 
				
			||||||
 | 
					    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    JAVACMD=`cygpath --unix "$JAVACMD"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # We build the pattern for arguments to be converted via cygpath
 | 
				
			||||||
 | 
					    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
 | 
				
			||||||
 | 
					    SEP=""
 | 
				
			||||||
 | 
					    for dir in $ROOTDIRSRAW ; do
 | 
				
			||||||
 | 
					        ROOTDIRS="$ROOTDIRS$SEP$dir"
 | 
				
			||||||
 | 
					        SEP="|"
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					    OURCYGPATTERN="(^($ROOTDIRS))"
 | 
				
			||||||
 | 
					    # Add a user-defined pattern to the cygpath arguments
 | 
				
			||||||
 | 
					    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
 | 
				
			||||||
 | 
					        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    # Now convert the arguments - kludge to limit ourselves to /bin/sh
 | 
				
			||||||
 | 
					    i=0
 | 
				
			||||||
 | 
					    for arg in "$@" ; do
 | 
				
			||||||
 | 
					        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
 | 
				
			||||||
 | 
					        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
 | 
				
			||||||
 | 
					            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            eval `echo args$i`="\"$arg\""
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					        i=`expr $i + 1`
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					    case $i in
 | 
				
			||||||
 | 
					        0) set -- ;;
 | 
				
			||||||
 | 
					        1) set -- "$args0" ;;
 | 
				
			||||||
 | 
					        2) set -- "$args0" "$args1" ;;
 | 
				
			||||||
 | 
					        3) set -- "$args0" "$args1" "$args2" ;;
 | 
				
			||||||
 | 
					        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
 | 
				
			||||||
 | 
					        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
 | 
				
			||||||
 | 
					        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
 | 
				
			||||||
 | 
					        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
 | 
				
			||||||
 | 
					        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
 | 
				
			||||||
 | 
					        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
 | 
				
			||||||
 | 
					    esac
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Escape application args
 | 
				
			||||||
 | 
					save () {
 | 
				
			||||||
 | 
					    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
 | 
				
			||||||
 | 
					    echo " "
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					APP_ARGS=`save "$@"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Collect all arguments for the java command, following the shell quoting and substitution rules
 | 
				
			||||||
 | 
					eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exec "$JAVACMD" "$@"
 | 
				
			||||||
@ -13,10 +13,8 @@
 | 
				
			|||||||
@rem See the License for the specific language governing permissions and
 | 
					@rem See the License for the specific language governing permissions and
 | 
				
			||||||
@rem limitations under the License.
 | 
					@rem limitations under the License.
 | 
				
			||||||
@rem
 | 
					@rem
 | 
				
			||||||
@rem SPDX-License-Identifier: Apache-2.0
 | 
					 | 
				
			||||||
@rem
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@if "%DEBUG%"=="" @echo off
 | 
					@if "%DEBUG%" == "" @echo off
 | 
				
			||||||
@rem ##########################################################################
 | 
					@rem ##########################################################################
 | 
				
			||||||
@rem
 | 
					@rem
 | 
				
			||||||
@rem  Gradle startup script for Windows
 | 
					@rem  Gradle startup script for Windows
 | 
				
			||||||
@ -27,8 +25,7 @@
 | 
				
			|||||||
if "%OS%"=="Windows_NT" setlocal
 | 
					if "%OS%"=="Windows_NT" setlocal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set DIRNAME=%~dp0
 | 
					set DIRNAME=%~dp0
 | 
				
			||||||
if "%DIRNAME%"=="" set DIRNAME=.
 | 
					if "%DIRNAME%" == "" set DIRNAME=.
 | 
				
			||||||
@rem This is normally unused
 | 
					 | 
				
			||||||
set APP_BASE_NAME=%~n0
 | 
					set APP_BASE_NAME=%~n0
 | 
				
			||||||
set APP_HOME=%DIRNAME%
 | 
					set APP_HOME=%DIRNAME%
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -43,13 +40,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
set JAVA_EXE=java.exe
 | 
					set JAVA_EXE=java.exe
 | 
				
			||||||
%JAVA_EXE% -version >NUL 2>&1
 | 
					%JAVA_EXE% -version >NUL 2>&1
 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto execute
 | 
					if "%ERRORLEVEL%" == "0" goto init
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo. 1>&2
 | 
					echo.
 | 
				
			||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
 | 
					echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 | 
				
			||||||
echo. 1>&2
 | 
					echo.
 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					echo Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					echo location of your Java installation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
goto fail
 | 
					goto fail
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -57,16 +54,31 @@ goto fail
 | 
				
			|||||||
set JAVA_HOME=%JAVA_HOME:"=%
 | 
					set JAVA_HOME=%JAVA_HOME:"=%
 | 
				
			||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 | 
					set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if exist "%JAVA_EXE%" goto execute
 | 
					if exist "%JAVA_EXE%" goto init
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo. 1>&2
 | 
					echo.
 | 
				
			||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
 | 
					echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
 | 
				
			||||||
echo. 1>&2
 | 
					echo.
 | 
				
			||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
 | 
					echo Please set the JAVA_HOME variable in your environment to match the
 | 
				
			||||||
echo location of your Java installation. 1>&2
 | 
					echo location of your Java installation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
goto fail
 | 
					goto fail
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:init
 | 
				
			||||||
 | 
					@rem Get command-line arguments, handling Windows variants
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if not "%OS%" == "Windows_NT" goto win9xME_args
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:win9xME_args
 | 
				
			||||||
 | 
					@rem Slurp the command line arguments.
 | 
				
			||||||
 | 
					set CMD_LINE_ARGS=
 | 
				
			||||||
 | 
					set _SKIP=2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:win9xME_args_slurp
 | 
				
			||||||
 | 
					if "x%~1" == "x" goto execute
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set CMD_LINE_ARGS=%*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:execute
 | 
					:execute
 | 
				
			||||||
@rem Setup the command line
 | 
					@rem Setup the command line
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -74,19 +86,17 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@rem Execute Gradle
 | 
					@rem Execute Gradle
 | 
				
			||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
 | 
					"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:end
 | 
					:end
 | 
				
			||||||
@rem End local scope for the variables with windows NT shell
 | 
					@rem End local scope for the variables with windows NT shell
 | 
				
			||||||
if %ERRORLEVEL% equ 0 goto mainEnd
 | 
					if "%ERRORLEVEL%"=="0" goto mainEnd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:fail
 | 
					:fail
 | 
				
			||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 | 
					rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 | 
				
			||||||
rem the _cmd.exe /c_ return code!
 | 
					rem the _cmd.exe /c_ return code!
 | 
				
			||||||
set EXIT_CODE=%ERRORLEVEL%
 | 
					if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
 | 
				
			||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
 | 
					exit /b 1
 | 
				
			||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
 | 
					 | 
				
			||||||
exit /b %EXIT_CODE%
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
:mainEnd
 | 
					:mainEnd
 | 
				
			||||||
if "%OS%"=="Windows_NT" endlocal
 | 
					if "%OS%"=="Windows_NT" endlocal
 | 
				
			||||||
							
								
								
									
										10
									
								
								__tests__/data/crypto-utils-test/settings.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								__tests__/data/crypto-utils-test/settings.gradle
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * This file was generated by the Gradle 'init' task.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * The settings file is used to specify which projects to include in your build.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Detailed information about configuring a multi-project build in Gradle can be found
 | 
				
			||||||
 | 
					 * in the user manual at https://docs.gradle.org/6.5/userguide/multi_project_builds.html
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					rootProject.name = 'basic'
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user