Skip to content

feat: gradle-support - #12

Merged
shossain786 merged 2 commits into
seleniumboot:mainfrom
PUSHPAK-JAISWAL:feat/gradle-support
Sep 26, 2026
Merged

shossain786 merged 2 commits into
seleniumboot:mainfrom
PUSHPAK-JAISWAL:feat/gradle-support

Conversation

@PUSHPAK-JAISWAL

@PUSHPAK-JAISWAL PUSHPAK-JAISWAL commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds text-based detection of Maven and Gradle build files to the analysis report. Gradle Groovy (build.gradle) and Kotlin (build.gradle.kts) projects now show their build system and dependency coordinates in the shared Detected technologies section. No Gradle runtime is required.

Includes Groovy and Kotlin Gradle fixtures, plus a Maven fixture to verify the shared report format. Updates the README with supported build files.

The dependency-block swap for migrate is not included because this checkout does not yet have a migrate command.

Validation

  • All 9 tests pass.
  • Compiled production and test sources and checked CLI output against all three build-file fixtures.

closes #8

@shossain786 shossain786 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @PUSHPAK-JAISWAL, this is good work. Using the secure XML parser settings and having Groovy and Kotlin fixtures is exactly what #8 asked for. I checked out the branch and the tests pass. There is one thing to change before merge, plus a small one.

1. A malformed build file aborts the whole analysis.
mavenDependencies throws IOException when a pom.xml cannot be parsed, and Cli does not catch it. So one broken pom in a large repo turns analyze into a stack trace and no report. The tool's stance is that a file it can't handle is reported and skipped, like the unparsable .java files. Please catch the parse failure in BuildFileAnalyzer.detect, add a line such as Build system: Maven (could not parse pom.xml), and add a test with a broken pom.

2. Files.walk(root) also picks up target/, build/, .gradle/ and node_modules/.
Please skip those directories. A fixture or generated build.gradle inside them currently shows up as a build system.

Also for coordination: #15 also adds a Detected technologies section and changes the Report record. Yours keeps the old constructor, which is the safer design, so I would like to merge this one first. #15 can then be rebased on top of it.

I did not need the migrate dependency swap for this PR, so please leave that for #6. Please change closes #8 to refs #8 so the issue stays open until then.

@PUSHPAK-JAISWAL

Copy link
Copy Markdown
Contributor Author

@shossain786 i will do the requested changes here also

@PUSHPAK-JAISWAL

Copy link
Copy Markdown
Contributor Author

@shossain786 I have made changes here please have a look.
bad pom.xml now don't stop detection of other builds.
added regression test in AnalyzerTest.java for both the behaviors.
all 11 test cases now pass.

@shossain786 shossain786 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @PUSHPAK-JAISWAL, both changes are in. A malformed pom is now reported and detection carries on, and generated and vendor directories are skipped. Both cases have regression tests. The branch builds and the tests pass. Approved.

Small heads-up: I'll merge this one first. #13 touches the same test file, so it may need a quick rebase afterwards.

@shossain786
shossain786 merged commit 89b446c into seleniumboot:main Sep 26, 2026
@shossain786 shossain786 mentioned this pull request Sep 26, 2026
2 tasks
@PUSHPAK-JAISWAL PUSHPAK-JAISWAL mentioned this pull request Oct 1, 2026
9 of 11 tasks
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.

Gradle project support

2 participants