139 Commits

Author SHA1 Message Date
Eric Haag
91199e7202 Gracefully handle detached HEAD in branch version check
Previously, the `CheckExpectedBranchVersionPlugin` would crash the Gradle
configuration phase if the project was in a detached HEAD state or not
in a Git repository, e.g., downloaded as a ZIP.

This commit refactors the plugin to be lazy and adopts several Gradle best
practices:

- Prevents build crashes on Git failures by gracefully catching non-zero
  exit codes, e.g., when checked out in a detached HEAD state.
- Moves the branch validation out of the task's main execution action
  and into an `onlyIf` predicate, allowing Gradle to skip the task
  entirely instead of executing an early return. This makes the skip
  outcome and reason visible in a Build Scan, rather than making it
  appear as if it executed.
- Defers the Git `exec` call to the execution phase using a lazy provider.
- Makes the task configuration cache compatible by avoiding illegal
  `Project` access inside the execution-time `onlyIf` closure.
- Improves user-facing logs and adds actionable bypass instructions when
  the project version doesn't match the branch version.

Signed-off-by: Eric Haag <ehaag@gradle.com>
2026-03-23 14:49:58 -04:00
Rob Winch
f6cb0bd610
Merge Use 2004-present Copyright Header
The original merge into main did not apply the changes. This fixes it.
Closes gh-17635
2025-07-29 10:52:42 -05:00
Josh Cummings
c43afbf5e1
Format Lambda Expressions
This commit updats lambda expressions so that
their variable is surrounded in parentheses.

Issue gh-13067
2025-06-20 10:41:29 -06:00
Rob Winch
a80592a707
Use commons-logging directly
Closes gh-17061
2025-05-06 13:27:13 -05:00
Josh Cummings
f4d2b61405
Merge branch '6.3.x' into 6.4.x 2025-01-24 11:25:42 -07:00
Josh Cummings
d6b295ba2c
S101 Depends On Assemble
Closes gh-16482
2025-01-24 11:25:26 -07:00
Tran Ngoc Nhan
31f8caec5f Polish diamond operator usage 2024-10-14 11:51:35 -07:00
Tran Ngoc Nhan
f3e95c8175 Remove unused import 2024-10-14 11:51:35 -07:00
Bryan Kelly
69231c5853 Avoid running the VerifyDependenciesVersionsTask and CheckExpecedBranchVersionTask when inputs are stable #15713 2024-09-02 08:45:48 -03:00
Marcus Hert Da Coregio
24f573dd4c Merge branch '5.8.x' into 6.2.x 2024-06-28 09:32:25 -03:00
Marcus Hert Da Coregio
1135ad5a5a Skip checkExpectedBranchVersion task on PR Build workflow
Issue gh-15226
2024-06-28 09:31:48 -03:00
Marcus Hert Da Coregio
87e3c23d3c Merge branch '5.8.x' into 6.2.x
Closes gh-15309
2024-06-27 14:35:45 -03:00
Marcus Hert Da Coregio
e3d642ce7c Add Task to Verify Branch Version Matches the Project Version
Closes gh-15226
2024-06-27 14:34:41 -03:00
Josh Cummings
836b350d2f
Merge branch '6.1.x' into 6.2.x
Closes gh-14639
2024-02-20 15:56:21 -07:00
Josh Cummings
d80fade8b1
Merge branch '5.8.x' into 6.1.x
Closes gh-14638
2024-02-20 15:55:48 -07:00
Josh Cummings
0c70f358d5
Update to Structure101 7.0.24375
Closes gh-14629
2024-02-20 15:43:58 -07:00
Steve Riesenberg
3f2d86ffc7
Merge branch '6.1.x' into 6.2.x 2024-02-02 17:32:02 -06:00
Steve Riesenberg
ad71f57143
Add spring-security-release-plugin
Issue gh-14242
2024-02-02 15:47:31 -06:00
Steve Riesenberg
447f40949c
Revert unnecessary merges on 6.1.x
This commit removes unnecessary main-branch merges starting from
9f8db22b774fe78fef3598c07e184c371892c1c7 and adds the following
needed commit(s) that were made afterward:

- 4d6ff49b9d663d0f25454f3704a45c83b35da689
- ed6ff670d102736eea0ac360921c9015151ac630
- c823b007942a04a27d02c0a28bc2ad85e8790084
- 44fad21363bef1b06422be28c9bbfadde5e44804
2023-10-31 15:22:15 -05:00
Steve Riesenberg
9db33f33c7
Revert unnecessary merges on 6.0.x
This commit removes unnecessary main-branch merges starting from
8750608b5bca45525c99d0a41a20ed02de93d8c7 and adds the following
needed commit(s) that were made afterward:

- 5dce82c48bc0b174838501c5a111b2de70822914
2023-10-31 15:11:45 -05:00
Marcus Hert Da Coregio
9f8db22b77 Merge branch '6.1.x' 2023-10-30 16:14:08 -03:00
Marcus Hert Da Coregio
8750608b5b Merge branch '6.0.x' into 6.1.x 2023-10-30 16:14:03 -03:00
Marcus Hert Da Coregio
21b7c95d83 Merge branch '5.8.x' into 6.0.x 2023-10-30 16:13:56 -03:00
Marcus Hert Da Coregio
3f64c6d745 Use version catalog to resolve nimbus dependency versions
Issue gh-14047
2023-10-30 16:11:51 -03:00
Marcus Hert Da Coregio
2cd302fb1b Revert "Use lenient configuration for prohibited dependencies check"
This reverts commit 602d4189d11a3cd59d07f77b81721731f191534e.
2023-10-30 16:11:02 -03:00
Marcus Hert Da Coregio
d37266d03d Merge branch '6.1.x' 2023-10-30 14:47:29 -03:00
Marcus Hert Da Coregio
bbf687c0ac Merge branch '6.0.x' into 6.1.x 2023-10-30 14:47:24 -03:00
Marcus Hert Da Coregio
3826a5e986 Merge branch '5.8.x' into 6.0.x 2023-10-30 14:47:17 -03:00
Marcus Hert Da Coregio
e8ec49b4c5 Resolve versions without downloading dependencies
Issue gh-14047
2023-10-30 14:46:12 -03:00
Marcus Hert Da Coregio
74e3551442 Merge branch '6.1.x' 2023-10-30 12:10:54 -03:00
Marcus Hert Da Coregio
aa6577da92 Merge branch '6.0.x' into 6.1.x 2023-10-30 12:10:47 -03:00
Marcus Hert Da Coregio
01a0c8845b Merge branch '5.8.x' into 6.0.x 2023-10-30 12:10:42 -03:00
Marcus Hert Da Coregio
602d4189d1 Use lenient configuration for prohibited dependencies check
Issue gh-14047
2023-10-30 12:10:32 -03:00
Marcus Hert Da Coregio
aa3e839bc7 Merge branch '6.1.x' 2023-10-30 11:25:56 -03:00
Marcus Hert Da Coregio
ee73f7d508 Merge branch '6.0.x' into 6.1.x 2023-10-30 11:25:46 -03:00
Marcus Hert Da Coregio
b17c0a5c59 Merge branch '5.8.x' into 6.0.x 2023-10-30 11:25:41 -03:00
Marcus Hert Da Coregio
884014c2fb Use lenient configuration to resolve artifacts
Issue gh-14047
2023-10-30 11:25:30 -03:00
Marcus Hert Da Coregio
9342699abc Merge branch '6.1.x' 2023-10-30 08:30:04 -03:00
Marcus Hert Da Coregio
1eaaa90e43 Merge branch '6.0.x' into 6.1.x 2023-10-30 08:29:57 -03:00
Marcus Hert Da Coregio
602a991971 Merge branch '5.8.x' into 6.0.x 2023-10-30 08:29:51 -03:00
Marcus Hert Da Coregio
47969ec7c9 Fix verifyDependenciesVersions not working with s101
Issue gh-14047
2023-10-30 08:28:15 -03:00
Marcus Da Coregio
c954b6aafd Merge branch '6.1.x' 2023-10-27 09:47:50 -03:00
Marcus Da Coregio
6d9c2c66fb Merge branch '6.0.x' into 6.1.x 2023-10-27 09:47:34 -03:00
Marcus Da Coregio
094e3b8a1d Merge branch '5.8.x' into 6.0.x 2023-10-27 09:47:18 -03:00
Marcus Da Coregio
6654479649 Polish VerifyDependenciesVersionsPlugin
Issue gh-14047
2023-10-27 09:45:19 -03:00
Marcus Da Coregio
70b0cd66e1 Merge branch '6.1.x'
Closes gh-14050
2023-10-25 13:46:50 -03:00
Marcus Da Coregio
e38fee2b40 Merge branch '6.0.x' into 6.1.x
Closes gh-14049
2023-10-25 13:46:41 -03:00
Marcus Da Coregio
28dcceae2e Merge branch '5.8.x' into 6.0.x
Closes gh-14048
2023-10-25 13:46:32 -03:00
Marcus Da Coregio
ad2bea3350 Fail build if nimbus-jose-jwt version is not aligned
Closes gh-14047
2023-10-25 13:44:23 -03:00
Marcus Da Coregio
a804355f5c Merge branch '6.1.x'
Closes gh-14035
2023-10-18 14:29:30 -03:00