Skip to content

Rteco 132 gradle shared build logic support test - #3719

Draft
udaykb2 wants to merge 5 commits into
masterfrom
RTECO-132-gradle-shared-build-logic-support-test
Draft

udaykb2 wants to merge 5 commits into
masterfrom
RTECO-132-gradle-shared-build-logic-support-test

Conversation

@udaykb2

@udaykb2 udaykb2 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • The pull request is targeting the master branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....

…on (Classic + FlexPack)

Adds two end-to-end tests verifying that a dependency declared only in a
shared buildSrc convention plugin (never in the api module's own
build.gradle) is correctly present in the published build-info, for
both Gradle execution modes:

- TestGradleBuildSharedBuildLogicClassic: plugin auto-injected via the
  init script (default jf gradle mode).
- TestGradleBuildSharedBuildLogicFlexPack: native mode
  (JFROG_RUN_NATIVE=true).

New fixture: testdata/gradle/buildsrcdependency (root + buildSrc + api,
convention plugin declares org.slf4j:slf4j-api, api uses it via a real
class without declaring it directly).

The FlexPack test explicitly removes any leftover .jfrog config before
running, since ShouldRunNative refuses native mode when a
.jfrog/projects/gradle.yaml is found via upward directory search, and
this fixture name is shared with the Classic test.
Adds a "lib" submodule to the buildsrcdependency fixture that
deliberately does NOT apply the shared java-common-conventions plugin.
Extends the shared-build-logic test assertions to also verify lib's
published build-info does NOT contain org.slf4j:slf4j-api, proving the
convention plugin's dependency only reaches subprojects that actually
apply it, not the whole build.
@udaykb2
udaykb2 marked this pull request as draft September 25, 2026 09:58
Adds TestGradleBuildSharedBuildLogicBuildLogicClassic and
TestGradleBuildSharedBuildLogicBuildLogicFlexPack, mirroring the
existing buildSrc-based tests but with the shared convention plugin
living in an included build-logic build instead. Covers the same
positive (api gets org.slf4j:slf4j-api) and negative (lib, which does
not apply the convention plugin, does not) assertions, for both
Classic and FlexPack modes.

New fixture: testdata/gradle/buildlogicdependency (root + build-logic +
api + lib), mirroring buildsrcdependency's structure.
@github-actions

Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


This branch was successfully deployed

1 active deployment
build-gate — 6826a599 Deployed Sep 25, 2026 by udaykb2 via Approval gate #1235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant