Repository navigation
Conversation
Goooler
marked this pull request as draft
September 10, 2026 06:24
- Annotate every doc snippet group with `<!-- test: TestClass#testMethod -->` and emit `@see` KDoc links in the generated doc tests. - Validate referenced test classes and methods in `GenerateDocTests`. - Make `documentTest` depend on `functionalTest` output. - Add functional tests for snippets that had no coverage yet. - Document the guideline in CONTRIBUTING.md.
Goooler
force-pushed
the
g/20260909/doc-test-links
branch
from
November 7, 2026 06:52
0798584 to
b737453
Compare
Goooler
marked this pull request as ready for review
November 7, 2026 06:53
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Documentation test links can target colliding classes or nonexistent members, and the R8 override test cannot distinguish an explicit override from the default dependency.
2 open issues
What changed in this PR
This PR connects Shadow’s documentation snippets to their supporting tests, making coverage easier to trace through generated KDoc links.
Changes:
- Add test-reference annotations throughout the documentation and document the contributor guideline.
- Validate referenced classes and methods, generate
@seelinks, and expose test outputs to the documentation suite. - Add functional tests for transformer configuration, R8 dependencies, sources JARs, and language-plugin compatibility.
| File | Description |
|---|---|
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/AppendingTransformerTest.kt |
Tests configuring a transformer instance with an action. |
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/R8MinimizationTest.kt |
Adds an explicit R8 dependency test. |
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/PublishingTest.kt |
Tests publishing the shadow component with sources. |
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/JavaPluginsTest.kt |
Tests custom sources output and Groovy/Scala compatibility. |
gradle/build-logic/src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/buildlogic/GenerateDocTests.kt |
Validates test references and generates KDoc links. |
docs/publishing/README.md |
Annotates publishing and sources examples with test references. |
docs/multi-project/README.md |
Annotates cross-project dependency examples. |
docs/kotlin-plugins/README.md |
Annotates Kotlin integration examples. |
docs/groovy-and-scala-plugins/README.md |
Links language-plugin examples to tests. |
docs/getting-started/README.md |
Adds test-class references to setup examples. |
docs/custom-tasks/README.md |
Annotates custom Shadow task examples. |
docs/configuration/reproducible-builds/README.md |
Links the reproducibility example to a test. |
docs/configuration/relocation/README.md |
Annotates relocation examples. |
docs/configuration/README.md |
Annotates general configuration examples. |
docs/configuration/minimizing/README.md |
Annotates minimization and R8 examples. |
docs/configuration/merging/README.md |
Annotates resource-merging and transformer examples. |
docs/configuration/filtering/README.md |
Links filtering examples to tests. |
docs/configuration/dependencies/README.md |
Annotates dependency configuration examples. |
docs/application-plugin/README.md |
Annotates application and distribution examples. |
CONTRIBUTING.md |
Requires behavioral coverage and snippet annotations. |
build.gradle.kts |
Wires test outputs and source directories into documentation testing. |
Review effort: Balanced
Comment on lines
+42
to
+43
| methodPattern.findAll(text).forEach { methods += it.groupValues[1] } | ||
| javaMethodPattern.findAll(text).forEach { methods += it.groupValues[1] } |
| appProjectBlock = | ||
| """ | ||
| |dependencies { | ||
| | shadowR8 '${BuildConfig.DEFAULT_R8_DEPENDENCY}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

<!-- test: TestClass#testMethod -->and emit@seeKDoc links in the generated doc tests.GenerateDocTests.documentTestdepend onfunctionalTestoutput.