Metadata-Version: 2.4
Name: java-1.8-dredd
Version: 1.1.0
Summary: Java 1.8+ language plugin for semver-dredd
Author-email: sr9000 <no@mail.org>
License-Expression: MIT
Project-URL: Homepage, https://github.com/sr9000/semver-dredd
Project-URL: Repository, https://github.com/sr9000/semver-dredd
Keywords: semantic-versioning,semver,plugin,java
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Version Control
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: semver-dredd>=1.0.20260704001

# java-1.8-dredd

Java 1.8+ language plugin for semver-dredd.

## Installation

```bash
# 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):

```bash
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:

```bash
# 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:

```yaml
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.

