Add Gradle Module Metadata (*.module) package handler#4652
Add Gradle Module Metadata (*.module) package handler#4652uttam282005 wants to merge 8 commits intoaboutcode-org:developfrom
*.module) package handler#4652Conversation
Signed-off-by: uttam282005 <uttam282005@gmail.com>
Signed-off-by: uttam282005 <uttam282005@gmail.com>
Signed-off-by: uttam282005 <uttam282005@gmail.com>
Signed-off-by: uttam282005 <uttam282005@gmail.com>
308ae08 to
b8a5afd
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds support for parsing Gradle Module Metadata (*.module) files that are published alongside Maven artifacts. The implementation extracts core package information (GAV coordinates), checksums, file sizes, and Gradle-specific metadata from JSON-formatted module files.
Key Changes
- Added
GradleModuleMetadataHandlerclass that extendsMavenBasePackageHandlerto parse*.modulefiles - Registered the new handler in the package datafile handlers list
- Added comprehensive test coverage using a real-world example (opentest4j-1.3.0)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 44 comments.
Show a summary per file
| File | Description |
|---|---|
src/packagedcode/maven.py |
Implements the GradleModuleMetadataHandler class with parsing logic for Gradle module metadata JSON files |
src/packagedcode/__init__.py |
Registers GradleModuleMetadataHandler in the APPLICATION_PACKAGE_DATAFILE_HANDLERS list |
tests/packagedcode/test_gradle_module_metadata.py |
Comprehensive test suite covering basic fields, variant metadata, error handling, and description formatting |
tests/packagedcode/data/gradle_module_metadata/opentest4j-1.3.0/opentest4j-1.3.0.module |
Test fixture containing real Gradle module metadata from Maven Central |
tests/packagedcode/data/plugin/plugins_list_linux.txt |
Updated expected output after registering the new handler |
AUTHORS.rst |
Added contributor credit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: uttam282005 <uttam282005@gmail.com>
Signed-off-by: uttam282005 <uttam282005@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 21 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: uttam282005 <uttam282005@gmail.com>
|
hi @pombredanne, can you review the changes pls? |
Fixes #4624
Summary
Add support for parsing Gradle Module Metadata (
*.module) files published alongside Maven artifacts (e.g. on Maven Central). The new handler extracts core GAV coordinates, checksums/size for the primary jar, Gradle metadata, and variants information.What changed
GradleModuleMetadataHandlerto parse*.moduleJSON metadata files.APPLICATION_PACKAGE_DATAFILE_HANDLERS.opentest4j-1.3.0.module.--list-packagesfixture output (Linux) after registering the handler.Tests
py.test tests/packagedcode/test_gradle_module_metadata.pypy.test tests/packagedcode/test_plugin_package.py::TestPlugins::test_package_list_commandTasks
Signed-off-by: uttam282005 uttam282005@gmail.com