Skip to main content

Java 1.8+ language plugin for semver-dredd

Project description

java-1.8-dredd

Java 1.8+ language plugin for semver-dredd.

Installation

# Install via the core package extra
pip install "semver-dredd[java]"

# Or install the plugin distribution directly
pip install java-1.8-dredd

Or install from local path (development):

pip install ./plugins/java-1.8-dredd

Requirements

  • Python 3.10+
  • semver-dredd >= 1.0.20260704001
  • JDK 1.8+ installed (both javac and java must be in PATH)

Usage

Once installed, the plugin is automatically discovered by semver-dredd:

# List plugins to verify installation
semver-dredd plugin list
semver-dredd plugin info java

# Generate snapshot for a Java source directory
semver-dredd snapshot --plugin java --path ./src/main/java --version 1.0.0

# Or use the managed init/status/bake workflow
semver-dredd init ./src/main/java --plugin java --version 1.0.0
semver-dredd status ./src/main/java --plugin java --details
semver-dredd bake ./src/main/java --plugin java

How it works

This plugin bundles a simple Java parser that uses regex-based extraction to identify:

  • Public classes and interfaces
  • Public/protected fields with types
  • Public/protected methods with signatures
  • Public static methods are also exposed as package-level functions

The parser is compiled on-the-fly using javac and runs with the bundled SnakeYAML library.

Note: This is a simple regex-based parser suitable for straightforward Java code. For complex codebases, a proper Java AST parser (like JavaParser) would be recommended.

Scope: include / exclude

include and exclude items are Java package prefixes (not glob syntax), matched recursively against the fully package-qualified class/function names the parser produces:

include: [com.example.api]
exclude: [com.example.api.internal]
  • Empty include (or omitted) analyzes the whole parsed public API under --path, exactly as without scope.
  • A non-empty include switches to allow-list mode: only classes/functions under the listed package prefixes (and nested sub-packages) are kept.
  • exclude is applied after include and supports a trailing * for non-recursive (single package level) exclusion, e.g. com.example.api.internal* excludes only that exact package, not deeper nested packages under it.
  • include matching nothing produces an empty snapshot API (logged as a warning) rather than falling back to no-scope behavior.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

java_1_8_dredd-1.1.0.tar.gz (306.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

java_1_8_dredd-1.1.0-py3-none-any.whl (305.8 kB view details)

Uploaded Python 3

File details

Details for the file java_1_8_dredd-1.1.0.tar.gz.

File metadata

  • Download URL: java_1_8_dredd-1.1.0.tar.gz
  • Upload date:
  • Size: 306.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for java_1_8_dredd-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f23aac887169ee48d880f4d0d67e381d109f8d87cb8cf812f810ddc7842767d6
MD5 a2d06cf85a89766ec505302a19140a18
BLAKE2b-256 afefe45ea8c0be11198ec6916264ed5ad542e379ddbc8af22bbb8e2e1d57f952

See more details on using hashes here.

File details

Details for the file java_1_8_dredd-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: java_1_8_dredd-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 305.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for java_1_8_dredd-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 815768df94331bb443e711fad02391a5d758088f72d9623864609e03639664f1
MD5 963dbfd171eca39bc6cf19119c0c869e
BLAKE2b-256 bea3005c53381547ace4858a2f5b67d58c97cd6ed379c9e03a2cc95b94e588df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page