-
Notifications
You must be signed in to change notification settings - Fork 155
SpringModulithProcessor
from apt rewrites javadoc.json
if application modules in different gradle modules
#1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am not a Gradle expert, but I'd assume the APT to be executed from the folder of the Gradle module, so that the individual files end up in the build folder of that very module? |
I have created a small reproduce for this issue: GitHub Repository. Please ensure you checkout the Steps to reproduce:
Actual result:
As a result, some of the Java documentation is missing because, when creating an instance of Expected result:
P.S. I suspect that a multi-module Maven project may encounter the same issue, but I cannot confirm this. |
Gradle's APT handling seems to significantly differ from Maven's as the Java compilation runs from a completely different base folder than the actual project compiled. Even more so, for multi-module projects, the base folder is always the same, which causes APT output using Java's plain File API to override itself in a multi-module project. I've tweaked the output folder detection to look up well-known APT parameters provided by either the Spring Boot plugin (org.springframework.boot.configurationprocessor.additionalMetadataLocations) or KAPT (for Kotlin-based projects, kapt.kotlin.generated) and derive the actual output folder from the values set for those. If neither of these is set, we fall back to the original local folder.
Sorry that I forgot to mention that it's important to run |
Can you try the 1.4.0-SNAPSHOTS? Happy to backport the fix to the currently maintained branches if that helps. |
Checked on However, these files are not used by |
I have a multi-module Gradle project with application modules in different Gradle modules. I've added
apt
to gather Javadoc for documentation, and it runs separately for each module. However, each module overwrites thejavadoc.json
file content.I'm uncertain about the best way to handle this. A solution that comes to mind is to generate a
javadoc.json
file in each module'sbuild
directory and then, when creatingSpringModulithDocumentationSource
, parse allbuild
directories forjavadoc.json
files and consolidate them into one instance.The text was updated successfully, but these errors were encountered: