kafka
59 строк · 2.2 Кб
1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements. See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership. The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License. You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied. See the License for the
15# specific language governing permissions and limitations
16# under the License.
17#
18---
19name: "Gradle Setup"
20description: "Setup Java and Gradle"
21inputs:
22# Composite actions do not support typed parameters. Everything is treated as a string
23# See: https://github.com/actions/runner/issues/2238
24java-version:
25description: "Java version to use"
26default: "17"
27gradle-cache-read-only:
28description: "Should the Gradle cache be read-only?"
29default: "true"
30gradle-cache-write-only:
31description: "Should the Gradle cache be write-only?"
32default: "false"
33develocity-access-key:
34description: "Optional access key for uploading build scans to Develocity"
35default: ""
36runs:
37using: "composite"
38steps:
39- name: Setup Java
40uses: actions/setup-java@v4
41with:
42distribution: temurin
43java-version: ${{ inputs.java-version }}
44- name: Setup Gradle
45uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
46env:
47GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
48with:
49gradle-version: wrapper
50develocity-access-key: ${{ inputs.develocity-access-key }}
51develocity-token-expiry: 4
52cache-read-only: ${{ inputs.gradle-cache-read-only }}
53cache-write-only: ${{ inputs.gradle-cache-write-only }}
54# Cache downloaded JDKs in addition to the default directories.
55gradle-home-cache-includes: |
56caches
57notifications
58jdks
59cache-cleanup: on-success
60