-
Notifications
You must be signed in to change notification settings - Fork 645
Improve build.gradle for building antora
#2977
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
Improve build.gradle for building antora
#2977
Conversation
bf05071 to
19ce3bc
Compare
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
19ce3bc to
69fb208
Compare
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
|
Thank you for your effort! |
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
| extensions: | ||
| - '@asciidoctor/tabs' | ||
| - '@springio/asciidoctor-extensions' | ||
| - '@springio/asciidoctor-extensions/javadoc-extension' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we have to contribute this one to the build-all docs branch: https://github.com/spring-projects/spring-amqp/blob/docs-build/antora-playbook.yml#L28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line use for prefix javadoc: when generating document
The reference:
https://github.com/spring-io/asciidoctor-extensions?tab=readme-ov-file#javadoc
I think it will be easier when we use javadoc links in document instead prefix {spring-amqp-java-docs}
build.gradle
Outdated
| "javadoc-location-org-springframework-transaction": "$springDocs/spring-framework/docs/$springVersion/javadoc-api".toString(), | ||
| "javadoc-location-org-springframework-amqp": "$springDocs/spring-amqp/docs/$project.version/api".toString(), | ||
| "micrometer-docs": "$micrometerDocsPrefix/micrometer/reference/${generateVersionWithoutPatch(micrometerVersion)}".toString(), | ||
| "micrometer-tracing-docs": "$micrometerDocsPrefix/tracing/reference/${generateVersionWithoutPatch(micrometerTracingVersion)}".toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change to double quotes?
That is not Groovy way about static strings as map keys: https://www.jetbrains.com/help/inspectopedia/GroovyGStringKey.html
build.gradle
Outdated
| if(matcher) { | ||
|
|
||
| return matcher[0][2] == null | ||
| return matcher[0][2] == null || matcher[0][2].startsWith("-M") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also -RC.
But in general the algorithm for Antora versioning is MAJOR.MINOR + -SNAPSHOT if present.
So, please, revise this respectively.
Just wrote this Groovy script to be sure:
version = '7.0.1-SNAPSHOT'
majorMinor = version.split('\\.')[0,1].join('.')
println majorMinor + (version.endsWith('-SNAPSHOT') ? '-SNAPSHOT' : '')
Or just one line for your logic:
return version.split('\\.')[0,1].join('.') + (version.endsWith('-SNAPSHOT') ? '-SNAPSHOT' : '')
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
artembilan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good so far.
Merging it to give it a spin.
Thank you!
|
So, that didn't go well: https://docs.spring.io/spring-amqp/reference/4.0-SNAPSHOT/amqp/broker-configuration.html#builder-api JavaDocs are not resolved. |
|
I will checkout from docs-build and create PR for fixing this |
When we build document, example with new version (4.0.0-SNAPSHOT) and it will work with Spring Framework 7.x version, but the current document is pointed with Spring
current(6.2.x) versionReference
https://docs.spring.io/spring-amqp/reference/4.0-SNAPSHOT/sample-apps.html#hello-world-sync
That's why I think we can use gradle for improving the build document process.
The main points:
javadoc:org.springframework.amqp...instead{spring-amqp-java-docs}...