Skip to content

RTECO-136 - Gradle shared build support - #3710

Open
udaykb2 wants to merge 5 commits into
masterfrom
RTECO-136-gradle-shared-build-support
Open

udaykb2 wants to merge 5 commits into
masterfrom
RTECO-136-gradle-shared-build-support

Conversation

@udaykb2

@udaykb2 udaykb2 commented Sep 15, 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 ./....

Summary

  • Add --include-shared-build to classic jf gradle.
  • Strip the flag from Gradle args and pass it into jfrog-cli-artifactory.
  • FlexPack / native Gradle is unchanged; the flag is not wired there.

udaykb2 and others added 4 commits September 12, 2026 15:36
…sic and Direct Plugin

Removed:
- Zero-config FlexPack branch from GradleCmd
- Native mode detection and routing for Gradle
- resolveServer helper function (only used for FlexPack)

Keeping only:
- Classic path: jf gradle (via init-script)
- Direct Plugin: apply plugin in build.gradle

This simplifies the Gradle execution model and reduces complexity.
…ic and Direct Plugin

Removed:
- runWithGradleNative() function from GradleCommand
- extractBuildFilePath() helper function
- FlexPack collections code via flexpackgradle package
- Entire artifactory/commands/flexpack/gradle/ directory
- Tests for extractBuildFilePath (106 lines)
- FlexPack import statements

Keeping only:
- Classic path: init-script via jf gradle
- Direct Plugin: apply plugin in build.gradle

The Direct Plugin via ArtifactoryPlugin handles buildSrc/composite builds
directly without needing FlexPack.
- Added includeSharedBuild flag definition in commandsflags.go
- Flag enables shared build collection (buildSrc, composite builds) when using gradle command
- Updated GradleCmd in cli.go to extract and pass flag to gradle execution
- Updated help documentation for gradle command
- Enables testing of classic init script approach: jf gradle build --include-shared-build

The flag routes through to the Gradle build system which uses the init script to apply the artifactory plugin and collect shared build metadata.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@udaykb2 udaykb2 changed the title Rteco 136 gradle shared build support RTECO-136 - Gradle shared build support Sep 15, 2026
@udaykb2
udaykb2 marked this pull request as ready for review September 15, 2026 09:32
@udaykb2
udaykb2 requested review from a team, agrasth, bhanurp, fluxxBot, itsmeleela and reshmifrog and removed request for a team September 15, 2026 09:32
--include-shared-build is only supported with Gradle Classic today. In the
FlexPack/native path (no gradle-config file), the flag was never stripped
from the task args, so it silently reached the real gradle binary as an
unrecognized argument and failed the build with a confusing error. Extract
and explicitly reject it with a clear message instead.
@udaykb2 udaykb2 added the safe to test Approve running integration tests on a pull request label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant