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

LUCENE-9849: Don't cross-link between modules for interim snapshot builds. #21

Merged
merged 1 commit into from Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 9 additions & 26 deletions gradle/documentation/documentation.gradle
Expand Up @@ -17,34 +17,17 @@

configure(rootProject) {
def urlVersion = project.baseVersion.replace('.', '_')
def refguideUrlVersion = project.baseVersion.replaceFirst(/^(\d+)\.(\d+).*$/, '$1_$2')

ext {
if (!skipLucene) {
luceneDocUrl = project.propertyOrDefault('lucene.javadoc.url', {
if (project.version != project.baseVersion) {
// non-release build
new File(project('lucene:documentation').buildDir, 'site').toURI().toASCIIString().minus(~'/$')
} else {
// release build
"https://lucene.apache.org/core/${urlVersion}"
}
}())
} else {
// TODO: The url should be constructed from actual dependency version... but this isn't available
// at evaluation time. it'd have to be a lazy property provider.
//
// There are actually two questions -
// 1) what to do about links to yet-unreleased Lucene versions and
// 2) forgot what the second question was...
//
// For now, just hardcode the latest released version.
// We could download Lucene javadoc artifacts for the actual dependency and just
// link it locally (and publish it on Solr site). This would ensure the docs are always up-to-date,
// even for Lucene snapshots.
luceneDocVersion = "9_0_0-SNAPSHOT"
luceneDocUrl = project.propertyOrDefault('lucene.javadoc.url', "https://lucene.apache.org/core/${luceneDocVersion}")
}
luceneDocUrl = project.propertyOrDefault('lucene.javadoc.url', {
if (project.version != project.baseVersion) {
// non-release build does not cross-link between modules.
return null
} else {
// release build
"https://lucene.apache.org/core/${urlVersion}"
}
}())
}

task documentation() {
Expand Down