Repository navigation
feat: gradle-support - #12
Conversation
shossain786
left a comment
There was a problem hiding this comment.
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.
|
@shossain786 i will do the requested changes here also |
|
@shossain786 I have made changes here please have a look. |
shossain786
left a comment
There was a problem hiding this comment.
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.
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
migrateis not included because this checkout does not yet have amigratecommand.Validation
closes #8