Skip to content

Add Gradle module metadata handler (fixes #3522)#4780

Open
devangpratap wants to merge 3 commits intoaboutcode-org:developfrom
devangpratap:develop
Open

Add Gradle module metadata handler (fixes #3522)#4780
devangpratap wants to merge 3 commits intoaboutcode-org:developfrom
devangpratap:develop

Conversation

@devangpratap
Copy link

Fixes #3522

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled and links the original issue above
  • Tests pass -- 4 tests added and passing locally
  • Commits are in uniquely-named feature branch and has no merge conflicts
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Changes

Added a new GradleModuleHandler to parse Gradle .module metadata files.

What's extracted:

  • Package name, version, namespace (Maven group)
  • Dependencies deduplicated across variants
  • Checksums (sha1, sha256, sha512, md5)
  • Scope mapped from org.gradle.usage attribute (java-api → compile, java-runtime → runtime)

Files added:

  • src/packagedcode/gradle_module.py — handler implementation
  • tests/packagedcode/test_gradle_module.py — 4 tests
  • Test fixtures in tests/packagedcode/data/gradle_module/

Signed-off-by: devangpratap <115096812+devangpratap@users.noreply.github.com>
@devangpratap devangpratap force-pushed the develop branch 2 times, most recently from afb0700 to 0f058c6 Compare February 28, 2026 23:55
Signed-off-by: devangpratap <115096812+devangpratap@users.noreply.github.com>
Add the gradle_module handler entry to the expected --list-packages
output files so that test_package_list_command passes. Also add
plugins_list.txt for macOS (non-Linux) test runs.

Signed-off-by: Devang Pratap Singh <devangpratapsingh@outlook.com>
Signed-off-by: devangpratap <115096812+devangpratap@users.noreply.github.com>
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.

Support gradle "module" metadata

1 participant