Skip to content
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

indra-crossdoc: init #44

Merged
merged 5 commits into from
Jan 6, 2022
Merged

indra-crossdoc: init #44

merged 5 commits into from
Jan 6, 2022

Conversation

zml2008
Copy link
Member

@zml2008 zml2008 commented Jan 5, 2022

crossdoc will automatically link between javadoc publications of modules
within a multi-module project. URL patterns are configurable, and a
helper task for publishing javadoc is provided.

Closes #32

Configuration

To generate javadoc, a baseUrl property must be set on the crossdoc extension:

indraCrossdoc {
  baseUrl().set(providers.gradleProperty("javadocPublishRoot")) // or a hardcoded URL
}

Other attributes can be specified too, like customizing the logic for how project URLs are constructed, relative to the base URL.

For example, if subprojects have a name prefix of foobar-, this could be stripped from the generated URLs with the following snippet:

indraCrossdoc {
  nameBasedUrlProvider {
    projectNamePrefix = 'foobar-'
  }
}

Tasks

  • generateOfflineLinks: A helper task, that will populate arguments to be passed to the javadoc task.
  • copyJavadoc: Copy the unpacked output of the javadoc task to another directory, following the relative path computed by the provider set in the project extension. The output directory can be provided as a command line argument, with the --output flag. By default, this output path is interpreted relative to the root project's project directory.

crossdoc will automatically link between javadoc publications of modules
within a multi-module project. URL patterns are configurable, and a
helper task for publishing javadoc is provided.
@zml2008 zml2008 added this to the 2.1.0 milestone Jan 5, 2022
@zml2008 zml2008 marked this pull request as ready for review January 6, 2022 02:55
@zml2008 zml2008 added the type: enhancement New feature or request label Jan 6, 2022
@zml2008 zml2008 self-assigned this Jan 6, 2022
@zml2008 zml2008 merged commit 9557d48 into main/2.x Jan 6, 2022
@zml2008 zml2008 deleted the feature/crossdoc branch January 6, 2022 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Javadoc cross-linking within a project
1 participant