From b591daad38f729825434b26a0ac390a7b3d3d9c2 Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Mon, 8 Mar 2021 15:04:20 +0100 Subject: [PATCH] SOLR-14759: correct build logic. --- gradle/documentation/documentation.gradle | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gradle/documentation/documentation.gradle b/gradle/documentation/documentation.gradle index 4e7b970cb84..9ed49de6c93 100644 --- a/gradle/documentation/documentation.gradle +++ b/gradle/documentation/documentation.gradle @@ -72,12 +72,14 @@ configure(rootProject) { if (!skipSolr) { dependsOn ':solr:documentation:assemble' - doFirst { - // Sanity check doc. version vs. actual version. - def actualLuceneVersion = getVersion("org.apache.lucene", "lucene-core").replace('.', '_') - if (luceneDocVersion != actualLuceneVersion) { - throw new GradleException("Compiling documentation with Lucene version ${luceneDocVersion} which is " + - "different from actual dependency ${actualLuceneVersion}?") + if (skipLucene) { + doFirst { + // Sanity check doc. version vs. actual version. + def actualLuceneVersion = getVersion("org.apache.lucene", "lucene-core").replace('.', '_') + if (luceneDocVersion != actualLuceneVersion) { + throw new GradleException("Compiling documentation with Lucene version ${luceneDocVersion} which is " + + "different from actual dependency ${actualLuceneVersion}?") + } } } }