Skip to content

Commit e28b562

Browse files
authored
chore(api): add class-level @SInCE to public entry points + coverage guard (H1) (#89)
Wires up Track H1 from the v1.6.5→1.7 readiness taskboard. 26 public types in the canonical user-reached packages now carry class-level @SInCE 1.0.0 Javadoc tags so callers see the introduction version at IDE quick-doc / generated Javadoc time without trawling CHANGELOG history. Files updated (class-level @SInCE 1.0.0): com.demcha.compose.GraphCompose com.demcha.compose.document.api.DocumentSession com.demcha.compose.document.api.DocumentPageSize com.demcha.compose.document.api.PageBackgroundFill com.demcha.compose.document.dsl.DocumentDsl com.demcha.compose.document.dsl.RichText com.demcha.compose.document.dsl.Transformable com.demcha.compose.document.dsl.{19 *Builder.java} Baseline @SInCE 1.0.0 is the pragmatic choice: these are foundational types that have shipped since the first GraphCompose release and predate the CHANGELOG history that could pin a more specific version. New public types added in subsequent PRs should use the upcoming release version (e.g. @SInCE 1.6.6). New guard: PublicApiSinceTagCoverageTest source-scans the three entry-point roots (GraphCompose.java, document.api/, document.dsl/) and fails the build if a new public top-level type lands without a class-level @SInCE tag. internal/ sub-packages are excluded by convention — InternalAnnotationCoverageTest covers those. Method-level @SInCE backfill for the ~380 public methods in these packages is intentionally out of scope; method @SInCE is now policy for ALL new public methods (the senior-review skill enforces this on new code) but retrofitting the existing surface is its own task. Verification: - ./mvnw -B -ntp test -pl . -Dtest=PublicApiSinceTagCoverageTest -> 1 test, 0 failures (guard green against current state) - ./mvnw -B -ntp test -pl . -> full suite green, no regression from the bulk Javadoc edits CHANGELOG entry added to v1.6.6 — Planned ### Build section.
1 parent f4b16db commit e28b562

28 files changed

Lines changed: 165 additions & 0 deletions

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ JitPack continue to resolve through the existing coordinates.
2121
`./mvnw -DskipTests -P japicmp verify -pl .`; HTML/MD/XML reports
2222
land in `target/japicmp/`. JitPack repository is scoped to the
2323
`japicmp` profile, so downstream consumers do not inherit it.
24+
- **Class-level `@since 1.0.0` Javadoc on the public entry-point
25+
surface** (Track H1). 26 public types in the canonical user-reached
26+
packages (`com.demcha.compose.GraphCompose`, `com.demcha.compose.document.api.{DocumentSession, DocumentPageSize, PageBackgroundFill}`,
27+
`com.demcha.compose.document.dsl.{DocumentDsl, RichText, Transformable}` plus all 19 DSL builders)
28+
now carry class-level `@since 1.0.0` Javadoc tags so callers can see
29+
the introduction version at IDE quick-doc / generated Javadoc time
30+
without trawling CHANGELOG history. New guard test
31+
`PublicApiSinceTagCoverageTest` source-scans the three entry-point
32+
roots and fails the build if a new public top-level type lands
33+
without a class-level `@since` tag; `internal/` sub-packages are
34+
excluded by convention (`InternalAnnotationCoverageTest` covers those).
35+
Method-level `@since` backfill for the ~380 public methods in these
36+
packages is intentionally out of scope here and tracked separately.
2437

2538
### Engine internals (no behaviour change)
2639

src/main/java/com/demcha/compose/GraphCompose.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* </ol>
3232
*
3333
* @author Artem Demchyshyn
34+
* @since 1.0.0
3435
*
3536
* <h3>Build a PDF file with the canonical DSL</h3>
3637
* <pre>

src/main/java/com/demcha/compose/document/api/DocumentPageSize.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*
99
* @param width page width in points
1010
* @param height page height in points
11+
* @since 1.0.0
1112
*/
1213
public record DocumentPageSize(double width, double height) {
1314
/**

src/main/java/com/demcha/compose/document/api/DocumentSession.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
* <p><b>Thread-safety:</b> this type is mutable and not thread-safe.</p>
6060
*
6161
* @author Artem Demchyshyn
62+
* @since 1.0.0
6263
*/
6364
public final class DocumentSession implements AutoCloseable {
6465
private static final Logger LIFECYCLE_LOG = LoggerFactory.getLogger("com.demcha.compose.document.lifecycle");

src/main/java/com/demcha/compose/document/api/PageBackgroundFill.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* Keep {@code yRatio + heightRatio <= 1.0} so the fill
4545
* stays within the page.
4646
* @param color fill color (required)
47+
* @since 1.0.0
4748
*/
4849
public record PageBackgroundFill(double xRatio,
4950
double yRatio,

src/main/java/com/demcha/compose/document/dsl/AbstractFlowBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @param <T> concrete builder type
2525
* @param <N> concrete node type
26+
* @since 1.0.0
2627
*/
2728
public abstract class AbstractFlowBuilder<T extends AbstractFlowBuilder<T, N>, N extends DocumentNode> {
2829
private String name = "";

src/main/java/com/demcha/compose/document/dsl/BarcodeBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
/**
4444
* Builder for semantic barcode and QR-code nodes.
45+
* @since 1.0.0
4546
*/
4647
public final class BarcodeBuilder implements Transformable<BarcodeBuilder> {
4748
private String name = "";

src/main/java/com/demcha/compose/document/dsl/CanvasLayerBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* positive {@code y} is down.</p>
2121
*
2222
* @author Artem Demchyshyn
23+
* @since 1.0.0
2324
*/
2425
public final class CanvasLayerBuilder {
2526

src/main/java/com/demcha/compose/document/dsl/DividerBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
/**
4343
* Builder for thin horizontal divider nodes.
44+
* @since 1.0.0
4445
*/
4546
public final class DividerBuilder extends ShapeBuilder {
4647
DividerBuilder() {

src/main/java/com/demcha/compose/document/dsl/DocumentDsl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* }</pre>
2525
*
2626
* @author Artem Demchyshyn
27+
* @since 1.0.0
2728
*/
2829
public final class DocumentDsl {
2930
private final DocumentSession session;

0 commit comments

Comments
 (0)