Centralize smoke app Gradle proxy setup#11575
Open
bric3 wants to merge 8 commits into
Open
Conversation
Exercise the two inputs the native smoke apps rely on: a provider-backed environment variable and a provider-backed file forwarded as a Gradle property. This locks in the Gradle 9 migration support that now replaces the old Exec wiring.
Leave the OpenLiberty smoke apps on the Maven wrapper for now. They are the only Maven nested application builds, so a dedicated NestedMavenBuild task would add API surface before there is a pattern to share.
Move nested smoke-test repository policy into the plugin. Nested Gradle builds now pass root proxy properties and load one init script, so individual application settings files no longer need to repeat the same repository blocks.
Let the smoke-test-app init script own nested repository policy. Application settings files now keep only project-specific settings, with Quarkus retaining its plugin version declaration.
Nested smoke-test builds already pass an explicit build-cache flag from the plugin. Removing the per-application CI cache redirects avoids dead settings and fixes the RUM EAR path that pointed outside the cached workspace.
Keep repository proxy init scripts as a smoke app convention so NestedGradleBuild only passes --init-script when callers provide scripts. Enable that convention only when CI=true and forward proxy properties from the outer build in that mode.
Use a Kotlin init script that configures plugin repositories in beforeSettings and registers a beforeProject hook to add Maven proxy repositories before project build scripts add their own repositories. This keeps project repositories available while making the CI proxy repositories first in nested smoke-test builds.
Use Gradle Action callbacks in the Kotlin init script instead of Kotlin DSL closure helpers. This keeps the script on non-Groovy hook overloads while still running early enough to prepend plugin and project Maven proxy repositories.
AlexeyKuznetsov-DD
approved these changes
Jun 4, 2026
Contributor
AlexeyKuznetsov-DD
left a comment
There was a problem hiding this comment.
LGTM, but I have a feeling that SmokeTestAppEndToEndTest can be refactored a bit to reuse similar code in tests.
| fun `nested build receives native app environment and provider backed file inputs`() { | ||
| writeOuterSettings() | ||
| File(projectDir.toFile(), "agent.jar").writeText("agent") | ||
| outerBuild.writeText( |
Contributor
There was a problem hiding this comment.
nit: can this be writeOuterBuild(...)? to be consistent with writeInnerBuild()?
Contributor
Author
There was a problem hiding this comment.
Yeah I'll make another pass on the tests tomorrow. I have the same feeling as you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Moves the smoke-test app Gradle proxy setup into the smoke app build logic.
The smoke app extension now adds the shared init script only for CI nested builds. The init script is Kotlin, runs early enough to affect plugin resolution, and prepends Maven proxy repositories without replacing project repositories.
It also removes duplicated nested repository and cache wiring from smoke apps that can rely on the shared setup.
Motivation
Gradle 9 exposed a few nested-build assumptions in the smoke apps: plugin repositories, CI proxy repositories, and duplicated boilerplate lived in too many places.
Centralizing that setup keeps the smoke apps consistent while preserving app-specific repositories, including the Tomcat repositories that still belong to those builds.
Additional Notes
This keeps the direction focused on Maven proxy injection. Ivy repository handling remains in app-specific builds for now.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)Jira ticket: [PROJ-IDENT]