-
-
Notifications
You must be signed in to change notification settings - Fork 687
Add Gradle Module Metadata (*.module) package handler
#4652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add Gradle Module Metadata (*.module) package handler
#4652
Conversation
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
308ae08 to
b8a5afd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
|
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 [email protected]