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

Enhance Antora gradle build #3287

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

pderop
Copy link
Contributor

@pderop pderop commented Jun 6, 2024

This PR tries to enhance user experience when building reactor netty/antora:

  1. if the current JDK version is < JDK17 and if one invokes "./gradlew antora", the currently, the following error is logged:
Task 'antora' not found in root project 'reactor-netty' and its subprojects.

instead of that, a clear error should be logged in order to indicate that the current JDK version is lower than 17, and JDK17+ version is required:

./gradlew antora
> antora task requires JDK 17 or higher.
  1. if the current JDK version is < JDK17 and if one invokes "./gradlew docs", and if the docs have not been previously built with a JDK17+ version, then currently nothing is displayed. A clear message should be logged in order to indicate that JDK17+ version is required to build the doc:
./gradlew docs
> docs task requires JDK 17 or higher
  1. if one is not interested in docs, and wants to just use just JDK8 and publish everything to local M2 without the doc, then currently, it's not possible and you get this error:
./gradlew publishToMavenLocal
Execution failed for task ':reactor-netty:publishMavenJavaPublicationToMavenLocal'.
> Failed to publish publication 'mavenJava' to repository 'mavenLocal'
   > Invalid publication 'mavenJava': artifact file does not exist: '/private/tmp/xx/reactor-netty/reactor-netty/build/distributions/reactor-netty-1.2.0-SNAPSHOT-docs.zip'

Instead, a warn message should just indicate that the current JDK version is lower than JDK17, and the docs won't be included in the local M2:

./gradlew publishToMavenLocal
Docs directory does not exist and JDK version is lower than 17. Skipping docsZip task.
  1. if one needs to build the doc with PDF convertion, but the asciidoctor-pdf command is not found from the PATH, then the build should fail and a clear error message should be diplayed:
./gradlew docs -PforcePdf
> PDF cannot be generated, asciidoctor-pdf not found from the PATH.

@pderop pderop added the type/documentation A documentation update label Jun 6, 2024
@pderop pderop added this to the 1.2.0-M3 milestone Jun 6, 2024
@pderop pderop self-assigned this Jun 6, 2024
@pderop pderop requested a review from a team June 6, 2024 14:48
@pderop pderop marked this pull request as draft June 6, 2024 14:50
@pderop
Copy link
Contributor Author

pderop commented Jun 6, 2024

@violetagg , mmm, please do not review this now, I need to check something ...

@pderop pderop removed the request for review from a team June 6, 2024 14:50
@pderop pderop force-pushed the enhance-antora-gradle-build branch from 53c6b69 to e2e988e Compare June 6, 2024 15:06
@pderop
Copy link
Contributor Author

pderop commented Jun 6, 2024

it should be ok to review now; I have updated the PR description.

@pderop pderop marked this pull request as ready for review June 6, 2024 15:15
@pderop pderop requested a review from a team June 6, 2024 15:15
@pderop
Copy link
Contributor Author

pderop commented Jun 7, 2024

@violetagg , thanks!

@pderop pderop merged commit e0734ce into reactor:main Jun 7, 2024
14 checks passed
@pderop pderop deleted the enhance-antora-gradle-build branch June 7, 2024 08:44
violetagg added a commit that referenced this pull request Jun 10, 2024
@violetagg violetagg added type/chore A task not related to code (build, formatting, process, ...) and removed type/documentation A documentation update labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants