Commit d36d57a
committed
MXTS-74974: buildMicroDocs/buildJavadoc classpath should use compileClasspath, not api
Both tasks set classpath = project.configurations.api. Git history shows
this used to be configurations.compile before the Gradle 5 migration
(commit 0a020fb), where it was mechanically swapped to `api` - the wrong
1:1 replacement. `api` is a narrow "exposed dependencies" bucket; the
correct modern equivalent of the old `compile` classpath is
compileClasspath, which is what the standard Gradle javadoc task uses
by default.
The bug this causes: any type referenced in project source but pulled in
via an `implementation`-scoped dependency is invisible to these tasks,
even though the main compileJava task (which uses compileClasspath)
compiles it fine. Surfaced by availability-service's ES 9.3.5 upgrade,
where co.elastic.clients.transport.rest5_client.Rest5ClientTransport
(from elasticsearch-java, implementation-scoped) failed to resolve while
Rest5Client/Rest5ClientBuilder (from elasticsearch-rest5-client,
api-scoped) resolved fine in the same file - consistent with this
exact classpath gap.
Verified: applying this fixed plugin (published to mavenLocal) to
availability-service with elasticsearch-java back on implementation
scope makes buildMicroDocs pass with no other changes.1 parent f281489 commit d36d57a
2 files changed
Lines changed: 3 additions & 5 deletions
File tree
- microdocs-crawler-gradle
- src/main/groovy/com/maxxton/microdocs/crawler/gradle
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | 60 | | |
63 | 61 | | |
64 | | - | |
| 62 | + | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
0 commit comments