File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,6 +148,18 @@ if (isReleasing && projectsToRelease.contains(project.name)) {
148148 }
149149}
150150
151+ // Defensive gate against unqualified `./gradlew jreleaserDeploy` fan-out. The org.jreleaser
152+ // plugin is applied to every subproject that consumes this convention plugin, so every one of
153+ // them registers a jreleaserDeploy task. Without this onlyIf, Gradle 8.5's strict input
154+ // validation fails the task on subprojects whose build/jreleaser directory was never primed
155+ // (e.g. flamingock-gradle-plugin, which is published via publishPlugins and has no deploy
156+ // config). Skipping cleanly preserves the script-level qualification fix as belt-and-suspenders.
157+ tasks.matching { it.name == " jreleaserDeploy" }.configureEach {
158+ onlyIf(" project not in projectsToRelease" ) {
159+ project == rootProject || projectsToRelease.contains(project.name)
160+ }
161+ }
162+
151163// Utility functions
152164fun Project.getIfAlreadyReleasedFromCentralPortal (): Boolean {
153165 val mavenUsername: String? = System .getenv(" JRELEASER_MAVENCENTRAL_USERNAME" )
Original file line number Diff line number Diff line change @@ -20,7 +20,11 @@ validate_bundle "$1"
2020
2121echo " Releasing bundle[$1 ] to Central Portal with max attempts[$maxAttempts ] and $waitingSeconds seconds delay"
2222for (( i= 1 ; i<= maxAttempts; i++ )) ; do
23- if ./gradlew jreleaserFullRelease -Pmodule=" $1 " --no-daemon --stacktrace; then
23+ # A bundle spans multiple projects, so we deliberately use the unqualified task name and
24+ # let the release-management convention plugin's projectsToRelease (driven by -PreleaseBundle)
25+ # decide which projects participate. The onlyIf gate inside that plugin skips projects
26+ # outside the bundle cleanly, so the unqualified fan-out is safe.
27+ if ./gradlew jreleaserFullRelease -PreleaseBundle=" $1 " --no-daemon --stacktrace; then
2428 exit 0
2529 fi
2630 if [ " $i " -eq " $maxAttempts " ]; then
Original file line number Diff line number Diff line change 1313 MODULE_FLAG=" "
1414 echo " Releasing bundle to Central Portal with max attempts[$maxAttempts ] and $waitingSeconds seconds delay"
1515fi
16+ # The unqualified jreleaserDeploy fans out to every subproject that has the org.jreleaser
17+ # plugin applied (it's applied broadly by flamingock.release-management). The release-management
18+ # convention plugin's onlyIf gate skips projects outside projectsToRelease so the fan-out is safe.
1619for (( i= 1 ; i<= maxAttempts; i++ )) ; do
1720 if ./gradlew jreleaserDeploy $MODULE_FLAG $extraFlags --no-daemon --stacktrace; then
1821 exit 0
You can’t perform that action at this time.
0 commit comments