Skip to content

Commit 3b46b44

Browse files
committed
[Gradle Release Plugin] - pre tag commit: 'v5.0.1'.
2 parents f40fb59 + 02d3dfe commit 3b46b44

30 files changed

+112110
-99528
lines changed

.github/workflows/check-action-typing.main.kts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,23 @@
2323
// work-around for https://youtrack.jetbrains.com/issue/KT-69145
2424
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0")
2525

26-
@file:DependsOn("actions:checkout:v4")
27-
@file:DependsOn("typesafegithub:github-actions-typing:v2")
26+
@file:DependsOn("actions:checkout___major:[v4,v5-alpha)")
27+
@file:DependsOn("typesafegithub:github-actions-typing___major:[v2,v3-alpha)")
2828

2929
import io.github.typesafegithub.workflows.actions.actions.Checkout
3030
import io.github.typesafegithub.workflows.actions.typesafegithub.GithubActionsTyping
3131
import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
3232
import io.github.typesafegithub.workflows.domain.triggers.PullRequest
3333
import io.github.typesafegithub.workflows.domain.triggers.Push
3434

35+
// comment in for editability with IntelliSense
36+
//fun workflowWithCopyright(
37+
// name: String,
38+
// on: List<io.github.typesafegithub.workflows.domain.triggers.Trigger>,
39+
// sourceFile: java.io.File,
40+
// block: io.github.typesafegithub.workflows.dsl.WorkflowBuilder.() -> Unit
41+
//) = Unit
42+
3543
workflowWithCopyright(
3644
name = "Check Action Typing",
3745
on = listOf(

.github/workflows/check-all-workflow-yaml-consistency.main.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,21 @@
2323
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0")
2424

2525
@file:Repository("https://bindings.krzeminski.it/")
26-
@file:DependsOn("actions:checkout:v4")
26+
@file:DependsOn("actions:checkout___major:[v4,v5-alpha)")
2727

2828
import io.github.typesafegithub.workflows.actions.actions.Checkout
2929
import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
3030
import io.github.typesafegithub.workflows.domain.triggers.PullRequest
3131
import io.github.typesafegithub.workflows.domain.triggers.Push
3232

33+
// comment in for editability with IntelliSense
34+
//fun workflowWithCopyright(
35+
// name: String,
36+
// on: List<io.github.typesafegithub.workflows.domain.triggers.Trigger>,
37+
// sourceFile: java.io.File,
38+
// block: io.github.typesafegithub.workflows.dsl.WorkflowBuilder.() -> Unit
39+
//) = Unit
40+
3341
workflowWithCopyright(
3442
name = "Check all Workflow YAML Consistency",
3543
on = listOf(

.github/workflows/check-dependency-versions.main.kts

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,28 @@
2323
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0")
2424

2525
@file:Repository("https://bindings.krzeminski.it/")
26-
@file:DependsOn("actions:checkout:v4")
27-
@file:DependsOn("actions:setup-java:v4")
28-
@file:DependsOn("burrunan:gradle-cache-action:v1")
26+
@file:DependsOn("actions:checkout___major:[v4,v5-alpha)")
27+
@file:DependsOn("actions:setup-java___major:[v4,v5-alpha)")
28+
@file:DependsOn("gradle:actions__setup-gradle___major:[v4,v5-alpha)")
2929

3030
import io.github.typesafegithub.workflows.actions.actions.Checkout
3131
import io.github.typesafegithub.workflows.actions.actions.SetupJava
3232
import io.github.typesafegithub.workflows.actions.actions.SetupJava.Distribution.Temurin
33-
import io.github.typesafegithub.workflows.actions.burrunan.GradleCacheAction
33+
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle
34+
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle.BuildScanTermsOfUseAgree.Yes
35+
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle.BuildScanTermsOfUseUrl.HttpsGradleComHelpLegalTermsOfUse
3436
import io.github.typesafegithub.workflows.domain.RunnerType.WindowsLatest
3537
import io.github.typesafegithub.workflows.domain.triggers.Cron
3638
import io.github.typesafegithub.workflows.domain.triggers.Schedule
3739

40+
// comment in for editability with IntelliSense
41+
//fun workflowWithCopyright(
42+
// name: String,
43+
// on: List<io.github.typesafegithub.workflows.domain.triggers.Trigger>,
44+
// sourceFile: java.io.File,
45+
// block: io.github.typesafegithub.workflows.dsl.WorkflowBuilder.() -> Unit
46+
//) = Unit
47+
3848
workflowWithCopyright(
3949
name = "Check Dependency Versions",
4050
on = listOf(
@@ -71,12 +81,23 @@ workflowWithCopyright(
7181
)
7282
)
7383
uses(
74-
name = "Check Dependency Versions",
75-
action = GradleCacheAction(
76-
arguments = listOf("--show-version", "dependencyUpdates"),
77-
debug = false,
78-
concurrent = true
84+
name = "Setup Gradle",
85+
action = ActionsSetupGradle(
86+
validateWrappers = false,
87+
buildScanPublish = true,
88+
buildScanTermsOfUseUrl = HttpsGradleComHelpLegalTermsOfUse,
89+
buildScanTermsOfUseAgree = Yes
7990
)
8091
)
92+
run(
93+
name = "Check Dependency Versions",
94+
command = listOf(
95+
"./gradlew",
96+
"--info",
97+
"--stacktrace",
98+
"--show-version",
99+
"dependencyUpdates"
100+
).joinToString(" ")
101+
)
81102
}
82103
}

.github/workflows/check-dependency-versions.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ jobs:
5656
java-version: '11'
5757
distribution: 'temurin'
5858
- id: 'step-3'
59-
name: 'Check Dependency Versions'
60-
uses: 'burrunan/gradle-cache-action@v1'
59+
name: 'Setup Gradle'
60+
uses: 'gradle/actions/setup-gradle@v4'
6161
with:
62-
debug: 'false'
63-
concurrent: 'true'
64-
arguments: |-
65-
--show-version
66-
dependencyUpdates
62+
build-scan-publish: 'true'
63+
build-scan-terms-of-use-url: 'https://gradle.com/help/legal-terms-of-use'
64+
build-scan-terms-of-use-agree: 'yes'
65+
validate-wrappers: 'false'
66+
- id: 'step-4'
67+
name: 'Check Dependency Versions'
68+
run: './gradlew --info --stacktrace --show-version dependencyUpdates'
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#!/usr/bin/env kotlin
2+
3+
/*
4+
* Copyright 2025 Björn Kautler
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
@file:Import("workflow-with-copyright.main.kts")
20+
21+
@file:Repository("https://repo.maven.apache.org/maven2/")
22+
// work-around for https://youtrack.jetbrains.com/issue/KT-69145
23+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0")
24+
25+
@file:Repository("https://bindings.krzeminski.it/")
26+
@file:DependsOn("actions:checkout___major:[v4,v5-alpha)")
27+
@file:DependsOn("actions:setup-java___major:[v4,v5-alpha)")
28+
@file:DependsOn("gradle:actions__dependency-submission___major:[v4,v5-alpha)")
29+
30+
import io.github.typesafegithub.workflows.actions.actions.Checkout
31+
import io.github.typesafegithub.workflows.actions.actions.SetupJava
32+
import io.github.typesafegithub.workflows.actions.actions.SetupJava.Distribution.Temurin
33+
import io.github.typesafegithub.workflows.actions.gradle.ActionsDependencySubmission
34+
import io.github.typesafegithub.workflows.actions.gradle.ActionsDependencySubmission.BuildScanTermsOfUseAgree.Yes
35+
import io.github.typesafegithub.workflows.actions.gradle.ActionsDependencySubmission.BuildScanTermsOfUseUrl.HttpsGradleComHelpLegalTermsOfUse
36+
import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
37+
import io.github.typesafegithub.workflows.domain.triggers.Push
38+
39+
// comment in for editability with IntelliSense
40+
//fun workflowWithCopyright(
41+
// name: String,
42+
// on: List<io.github.typesafegithub.workflows.domain.triggers.Trigger>,
43+
// sourceFile: java.io.File,
44+
// block: io.github.typesafegithub.workflows.dsl.WorkflowBuilder.() -> Unit
45+
//) = Unit
46+
47+
workflowWithCopyright(
48+
name = "Submit Dependency Graph",
49+
on = listOf(
50+
Push(branches = listOf("master"))
51+
),
52+
sourceFile = __FILE__
53+
) {
54+
job(
55+
id = "submit_dependency_graph",
56+
name = "Submit Dependency Graph",
57+
runsOn = UbuntuLatest
58+
) {
59+
run(
60+
name = "Configure Git",
61+
command = "git config --global core.autocrlf input"
62+
)
63+
uses(
64+
name = "Checkout",
65+
action = Checkout()
66+
)
67+
uses(
68+
name = "Setup Java 11",
69+
action = SetupJava(
70+
javaVersion = "11",
71+
distribution = Temurin
72+
)
73+
)
74+
uses(
75+
name = "Submit Dependency Graph",
76+
action = ActionsDependencySubmission(
77+
additionalArguments = listOf(
78+
"--info",
79+
"--stacktrace",
80+
"--show-version"
81+
),
82+
buildScanPublish = true,
83+
buildScanTermsOfUseUrl = HttpsGradleComHelpLegalTermsOfUse,
84+
buildScanTermsOfUseAgree = Yes
85+
)
86+
)
87+
}
88+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2020-2025 Björn Kautler
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This file was generated using Kotlin DSL (.github/workflows/submit-dependency-graph.main.kts).
16+
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
17+
# Generated with https://github.com/typesafegithub/github-workflows-kt
18+
19+
name: 'Submit Dependency Graph'
20+
on:
21+
push:
22+
branches:
23+
- 'master'
24+
concurrency:
25+
group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'
26+
cancel-in-progress: true
27+
jobs:
28+
check_yaml_consistency:
29+
name: 'Check YAML consistency'
30+
runs-on: 'ubuntu-latest'
31+
steps:
32+
- id: 'step-0'
33+
name: 'Check out'
34+
uses: 'actions/checkout@v4'
35+
- id: 'step-1'
36+
name: 'Execute script'
37+
run: 'rm ''.github/workflows/submit-dependency-graph.yaml'' && ''.github/workflows/submit-dependency-graph.main.kts'''
38+
- id: 'step-2'
39+
name: 'Consistency check'
40+
run: 'git diff --exit-code ''.github/workflows/submit-dependency-graph.yaml'''
41+
submit_dependency_graph:
42+
name: 'Submit Dependency Graph'
43+
runs-on: 'ubuntu-latest'
44+
needs:
45+
- 'check_yaml_consistency'
46+
steps:
47+
- id: 'step-0'
48+
name: 'Configure Git'
49+
run: 'git config --global core.autocrlf input'
50+
- id: 'step-1'
51+
name: 'Checkout'
52+
uses: 'actions/checkout@v4'
53+
- id: 'step-2'
54+
name: 'Setup Java 11'
55+
uses: 'actions/setup-java@v4'
56+
with:
57+
java-version: '11'
58+
distribution: 'temurin'
59+
- id: 'step-3'
60+
name: 'Submit Dependency Graph'
61+
uses: 'gradle/actions/dependency-submission@v4'
62+
with:
63+
additional-arguments: '--info --stacktrace --show-version'
64+
build-scan-publish: 'true'
65+
build-scan-terms-of-use-url: 'https://gradle.com/help/legal-terms-of-use'
66+
build-scan-terms-of-use-agree: 'yes'

.github/workflows/test.main.kts

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,21 @@
2323
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0")
2424

2525
@file:Repository("https://bindings.krzeminski.it/")
26-
@file:DependsOn("actions:cache__restore:v4")
27-
@file:DependsOn("actions:cache__save:v4")
28-
@file:DependsOn("actions:checkout:v4")
29-
@file:DependsOn("actions:setup-java:v4")
30-
@file:DependsOn("burrunan:gradle-cache-action:v1")
26+
@file:DependsOn("actions:cache__restore___major:[v4,v5-alpha)")
27+
@file:DependsOn("actions:cache__save___major:[v4,v5-alpha)")
28+
@file:DependsOn("actions:checkout___major:[v4,v5-alpha)")
29+
@file:DependsOn("actions:setup-java___major:[v4,v5-alpha)")
30+
@file:DependsOn("gradle:actions__setup-gradle___major:[v4,v5-alpha)")
3131
@file:DependsOn("Vampire:setup-wsl:RELEASE")
3232

3333
import io.github.typesafegithub.workflows.actions.actions.CacheRestore
3434
import io.github.typesafegithub.workflows.actions.actions.CacheSave
3535
import io.github.typesafegithub.workflows.actions.actions.Checkout
3636
import io.github.typesafegithub.workflows.actions.actions.SetupJava
3737
import io.github.typesafegithub.workflows.actions.actions.SetupJava.Distribution.Temurin
38-
import io.github.typesafegithub.workflows.actions.burrunan.GradleCacheAction
38+
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle
39+
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle.BuildScanTermsOfUseAgree.Yes
40+
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle.BuildScanTermsOfUseUrl.HttpsGradleComHelpLegalTermsOfUse
3941
import io.github.typesafegithub.workflows.actions.vampire.SetupWsl
4042
import io.github.typesafegithub.workflows.actions.vampire.SetupWsl.Distribution.Debian
4143
import io.github.typesafegithub.workflows.actions.vampire.SetupWsl.Distribution.Ubuntu1604
@@ -58,6 +60,14 @@ import io.github.typesafegithub.workflows.dsl.WorkflowBuilder
5860
import io.github.typesafegithub.workflows.dsl.expressions.expr
5961
import kotlin.math.min
6062

63+
// comment in for editability with IntelliSense
64+
//fun workflowWithCopyright(
65+
// name: String,
66+
// on: List<io.github.typesafegithub.workflows.domain.triggers.Trigger>,
67+
// sourceFile: java.io.File,
68+
// block: io.github.typesafegithub.workflows.dsl.WorkflowBuilder.() -> Unit
69+
//) = Unit
70+
6171
val environments = listOf(
6272
"windows-2019",
6373
"windows-2022",
@@ -186,19 +196,24 @@ workflowWithCopyright(
186196
)
187197
)
188198
uses(
189-
name = "Build",
190-
action = GradleCacheAction(
191-
arguments = listOf(
192-
"--show-version",
193-
"build",
194-
"--info",
195-
"--stacktrace",
196-
"--scan"
197-
),
198-
debug = false,
199-
concurrent = true
199+
name = "Setup Gradle",
200+
action = ActionsSetupGradle(
201+
validateWrappers = false,
202+
buildScanPublish = true,
203+
buildScanTermsOfUseUrl = HttpsGradleComHelpLegalTermsOfUse,
204+
buildScanTermsOfUseAgree = Yes
200205
)
201206
)
207+
run(
208+
name = "Build",
209+
command = listOf(
210+
"./gradlew",
211+
"--info",
212+
"--stacktrace",
213+
"--show-version",
214+
"build"
215+
).joinToString(" ")
216+
)
202217
uses(
203218
name = "Save built artifacts to cache",
204219
action = CacheSave(

.github/workflows/test.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,17 @@ jobs:
5858
java-version: '11'
5959
distribution: 'temurin'
6060
- id: 'step-3'
61-
name: 'Build'
62-
uses: 'burrunan/gradle-cache-action@v1'
61+
name: 'Setup Gradle'
62+
uses: 'gradle/actions/setup-gradle@v4'
6363
with:
64-
debug: 'false'
65-
concurrent: 'true'
66-
arguments: |-
67-
--show-version
68-
build
69-
--info
70-
--stacktrace
71-
--scan
64+
build-scan-publish: 'true'
65+
build-scan-terms-of-use-url: 'https://gradle.com/help/legal-terms-of-use'
66+
build-scan-terms-of-use-agree: 'yes'
67+
validate-wrappers: 'false'
7268
- id: 'step-4'
69+
name: 'Build'
70+
run: './gradlew --info --stacktrace --show-version build'
71+
- id: 'step-5'
7372
name: 'Save built artifacts to cache'
7473
uses: 'actions/cache/save@v4'
7574
with:

0 commit comments

Comments
 (0)