Skip to content

Commit e8c0b70

Browse files
committed
Removing and cleaning up build conditionals introduced before lucene/solr repo split.
1 parent c33e4f2 commit e8c0b70

File tree

10 files changed

+181
-228
lines changed

10 files changed

+181
-228
lines changed

build.gradle

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ allprojects {
5454
}
5555

5656
ext {
57-
skipSolr = (System.getProperty("skip.solr") as Boolean)
58-
skipLucene = (System.getProperty("skip.lucene") as Boolean)
59-
6057
// "base" version is stripped of the qualifier. Compute it.
6158
baseVersion = {
6259
def m = (version =~ /^(\d+\.\d+\.\d+)(-(.+))?/)
@@ -115,9 +112,7 @@ apply from: file('gradle/generate-defaults.gradle')
115112
// Ant-compatibility layer: apply folder layout early so that
116113
// evaluation of other scripts doesn't need to be deferred.
117114
apply from: file('gradle/ant-compat/folder-layout.gradle')
118-
if (!skipSolr) {
119-
apply from: file('gradle/ant-compat/solr.folder-layout.gradle') // SOLR ONLY
120-
}
115+
apply from: file('gradle/ant-compat/solr.folder-layout.gradle')
121116

122117
// Set up defaults and configure aspects for certain modules or functionality
123118
// (java, tests)
@@ -152,9 +147,7 @@ apply from: file('gradle/validation/gradlew-scripts-tweaked.gradle')
152147
apply from: file('gradle/validation/validate-log-calls.gradle')
153148
apply from: file('gradle/validation/check-broken-links.gradle')
154149

155-
if (!skipSolr) {
156-
apply from: file('gradle/validation/solr.config-file-sanity.gradle') // SOLR ONLY
157-
}
150+
apply from: file('gradle/validation/solr.config-file-sanity.gradle')
158151

159152
// Source or data regeneration tasks
160153
apply from: file('gradle/generation/javacc.gradle')
@@ -176,23 +169,23 @@ apply from: file('gradle/help.gradle')
176169
// of potential problems with the build conventions, dependencies, etc.
177170
apply from: file('gradle/ant-compat/misc.gradle')
178171

179-
apply from: file('gradle/ant-compat/force-versions.gradle') // SOLR ONLY
180-
apply from: file('gradle/ant-compat/artifact-naming.gradle') // SOLR ONLY
172+
apply from: file('gradle/ant-compat/force-versions.gradle')
173+
apply from: file('gradle/ant-compat/artifact-naming.gradle')
181174

182175
apply from: file('gradle/documentation/documentation.gradle')
183176
apply from: file('gradle/documentation/changes-to-html.gradle')
184177
apply from: file('gradle/documentation/markdown.gradle')
185178
apply from: file('gradle/documentation/render-javadoc.gradle')
186179

187180
apply from: file('gradle/hacks/gradle-archives.gradle')
188-
apply from: file('gradle/hacks/solr.findbugs.gradle') // SOLR ONLY
181+
apply from: file('gradle/hacks/solr.findbugs.gradle')
189182

190183
apply from: file('gradle/hacks/gradle.gradle')
191184
apply from: file('gradle/hacks/hashmapAssertions.gradle')
192185

193186
apply from: file('gradle/solr-tlp-migration/inaccessible-test-sources.gradle')
194187

195-
apply from: file('gradle/solr/packaging.gradle') // SOLR ONLY
196-
apply from: file('gradle/solr/solr-forbidden-apis.gradle') // SOLR ONLY
188+
apply from: file('gradle/solr/packaging.gradle')
189+
apply from: file('gradle/solr/solr-forbidden-apis.gradle')
197190

198-
apply from: file('gradle/ant-compat/solr.post-jar.gradle') // SOLR ONLY
191+
apply from: file('gradle/ant-compat/solr.post-jar.gradle')

gradle/documentation/documentation.gradle

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,17 @@ configure(rootProject) {
3434
luceneDocVersion = "9_0_0-SNAPSHOT"
3535
luceneDocUrl = project.propertyOrDefault('lucene.javadoc.url', "https://lucene.apache.org/core/${luceneDocVersion}")
3636

37-
// SOLR ONLY
38-
if (!skipSolr) {
39-
solrDocUrl = project.propertyOrDefault('solr.javadoc.url', {
40-
if (project.version != project.baseVersion) {
41-
// non-release build
42-
new File(project('solr:documentation').buildDir, 'site').toURI().toASCIIString().minus(~'/$')
43-
} else {
44-
// release build
45-
"https://solr.apache.org/docs/${urlVersion}"
46-
}
47-
}())
48-
49-
solrRefguideUrl = project.propertyOrDefault('solr.refguide.url', "https://lucene.apache.org/solr/guide/${refguideUrlVersion}")
50-
}
37+
solrDocUrl = project.propertyOrDefault('solr.javadoc.url', {
38+
if (project.version != project.baseVersion) {
39+
// non-release build
40+
new File(project('solr:documentation').buildDir, 'site').toURI().toASCIIString().minus(~'/$')
41+
} else {
42+
// release build
43+
"https://solr.apache.org/docs/${urlVersion}"
44+
}
45+
}())
46+
47+
solrRefguideUrl = project.propertyOrDefault('solr.refguide.url', "https://lucene.apache.org/solr/guide/${refguideUrlVersion}")
5148
}
5249

5350
task documentation() {
@@ -112,40 +109,37 @@ configure(subprojects.findAll { it.path == ':lucene:documentation' || it.path ==
112109
}
113110
}
114111

115-
// SOLR ONLY
116-
if (!skipSolr) {
117-
configure(project(':solr:documentation')) {
118-
task documentationMinimal() {
119-
group = 'documentation'
120-
description = "Generate stub Solr documentation pointing to web page (that's part of Solr TGZ)"
121-
dependsOn 'copyMiniDocumentationAssets', 'createMiniDocumentationIndex', 'copyChangesToHtmlForMiniSite'
122-
}
112+
configure(project(':solr:documentation')) {
113+
task documentationMinimal() {
114+
group = 'documentation'
115+
description = "Generate stub Solr documentation pointing to web page (that's part of Solr TGZ)"
116+
dependsOn 'copyMiniDocumentationAssets', 'createMiniDocumentationIndex', 'copyChangesToHtmlForMiniSite'
117+
}
123118

124-
task copyChangesToHtmlForMiniSite(type: Copy) {
125-
from project.docroot
126-
into project.docrootMinimal
127-
include 'changes/**'
128-
dependsOn 'changesToHtml'
129-
}
119+
task copyChangesToHtmlForMiniSite(type: Copy) {
120+
from project.docroot
121+
into project.docrootMinimal
122+
include 'changes/**'
123+
dependsOn 'changesToHtml'
124+
}
130125

131-
task copyMiniDocumentationAssets(type: Copy) {
132-
includeEmptyDirs = false
133-
from('src/assets')
134-
into project.docrootMinimal
135-
}
126+
task copyMiniDocumentationAssets(type: Copy) {
127+
includeEmptyDirs = false
128+
from('src/assets')
129+
into project.docrootMinimal
130+
}
136131

137-
assemble {
138-
dependsOn documentationMinimal
139-
}
132+
assemble {
133+
dependsOn documentationMinimal
134+
}
140135

141-
configurations {
142-
minimalSite
143-
}
136+
configurations {
137+
minimalSite
138+
}
144139

145-
artifacts {
146-
minimalSite project.docrootMinimal, {
147-
builtBy documentationMinimal
148-
}
140+
artifacts {
141+
minimalSite project.docrootMinimal, {
142+
builtBy documentationMinimal
149143
}
150144
}
151145
}

gradle/documentation/markdown.gradle

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -52,38 +52,35 @@ configure(subprojects.findAll { it.path == ':lucene:documentation' || it.path ==
5252
}
5353
}
5454

55-
// SOLR ONLY
56-
if (!skipSolr) {
57-
configure(project(':solr:documentation')) {
58-
markdownToHtml {
59-
from(project.markdownSrc) {
60-
include '**/*.md'
61-
exclude '**/*.template.md'
62-
}
55+
configure(project(':solr:documentation')) {
56+
markdownToHtml {
57+
from(project.markdownSrc) {
58+
include '**/*.md'
59+
exclude '**/*.template.md'
6360
}
61+
}
6462

65-
task createDocumentationIndex(type: MarkdownTemplateTask) {
66-
dependsOn markdownToHtml
63+
task createDocumentationIndex(type: MarkdownTemplateTask) {
64+
dependsOn markdownToHtml
6765

68-
outputFile = file("${project.docroot}/index.html")
69-
templateFile = file("${project.markdownSrc}/index.template.md")
66+
outputFile = file("${project.docroot}/index.html")
67+
templateFile = file("${project.markdownSrc}/index.template.md")
7068

71-
// list all properties used by the template here to allow uptodate checks to be correct:
72-
inputs.property('version', project.version)
73-
inputs.property('solrRefguideUrl', project.solrRefguideUrl)
74-
inputs.property('luceneDocUrl', project.luceneDocUrl)
69+
// list all properties used by the template here to allow uptodate checks to be correct:
70+
inputs.property('version', project.version)
71+
inputs.property('solrRefguideUrl', project.solrRefguideUrl)
72+
inputs.property('luceneDocUrl', project.luceneDocUrl)
7573

76-
withProjectList()
77-
}
74+
withProjectList()
75+
}
7876

79-
task createMiniDocumentationIndex(type: MarkdownTemplateTask) {
80-
outputFile = file("${project.docrootMinimal}/index.html")
81-
templateFile = file("${project.markdownSrc}/online-link.template.md")
77+
task createMiniDocumentationIndex(type: MarkdownTemplateTask) {
78+
outputFile = file("${project.docrootMinimal}/index.html")
79+
templateFile = file("${project.markdownSrc}/online-link.template.md")
8280

83-
// list all properties used by the template here to allow uptodate checks to be correct:
84-
inputs.property('version', project.version)
85-
inputs.property('solrDocUrl', project.solrDocUrl)
86-
}
81+
// list all properties used by the template here to allow uptodate checks to be correct:
82+
inputs.property('version', project.version)
83+
inputs.property('solrDocUrl', project.solrDocUrl)
8784
}
8885
}
8986

gradle/documentation/render-javadoc.gradle

Lines changed: 53 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -97,62 +97,60 @@ allprojects {
9797

9898
// Configure project-specific tweaks and to-dos.
9999

100-
if (!skipSolr) {
101-
configure(project(":solr").allprojects) {
102-
project.tasks.withType(RenderJavadocTask) {
103-
// TODO: fix missing javadocs
104-
javadocMissingLevel = "package"
105-
}
100+
configure(project(":solr").allprojects) {
101+
project.tasks.withType(RenderJavadocTask) {
102+
// TODO: fix missing javadocs
103+
javadocMissingLevel = "package"
106104
}
105+
}
107106

108-
configure(project(":solr:contrib:analysis-extras")) {
109-
project.tasks.withType(RenderJavadocTask) {
110-
// TODO: clean up split packages
111-
javadocMissingIgnore = [
112-
"org.apache.solr.schema",
113-
"org.apache.solr.update.processor"
114-
]
115-
}
107+
configure(project(":solr:contrib:analysis-extras")) {
108+
project.tasks.withType(RenderJavadocTask) {
109+
// TODO: clean up split packages
110+
javadocMissingIgnore = [
111+
"org.apache.solr.schema",
112+
"org.apache.solr.update.processor"
113+
]
116114
}
115+
}
117116

118-
configure(project(":solr:contrib:analytics")) {
119-
project.tasks.withType(RenderJavadocTask) {
120-
// TODO: clean up split packages
121-
javadocMissingIgnore = [
122-
"org.apache.solr.handler",
123-
"org.apache.solr.handler.component",
124-
"org.apache.solr.response"
125-
]
126-
}
117+
configure(project(":solr:contrib:analytics")) {
118+
project.tasks.withType(RenderJavadocTask) {
119+
// TODO: clean up split packages
120+
javadocMissingIgnore = [
121+
"org.apache.solr.handler",
122+
"org.apache.solr.handler.component",
123+
"org.apache.solr.response"
124+
]
127125
}
126+
}
128127

129-
configure(project(":solr:contrib:langid")) {
130-
project.tasks.withType(RenderJavadocTask) {
131-
// TODO: clean up split packages
132-
javadocMissingIgnore = ["org.apache.solr.update.processor"]
133-
}
128+
configure(project(":solr:contrib:langid")) {
129+
project.tasks.withType(RenderJavadocTask) {
130+
// TODO: clean up split packages
131+
javadocMissingIgnore = ["org.apache.solr.update.processor"]
134132
}
133+
}
135134

136-
configure(project(":solr:solrj")) {
137-
project.tasks.withType(RenderJavadocTask) {
138-
// TODO: clean up split packages
139-
javadocMissingIgnore = ["org.apache.solr.client.solrj.embedded"]
140-
}
135+
configure(project(":solr:solrj")) {
136+
project.tasks.withType(RenderJavadocTask) {
137+
// TODO: clean up split packages
138+
javadocMissingIgnore = ["org.apache.solr.client.solrj.embedded"]
141139
}
140+
}
142141

143-
configure(project(":solr:test-framework")) {
144-
project.tasks.withType(RenderJavadocTask) {
145-
// TODO: clean up split packages
146-
javadocMissingIgnore = [
147-
"org.apache.solr",
148-
"org.apache.solr.analysis",
149-
"org.apache.solr.cloud",
150-
"org.apache.solr.core",
151-
"org.apache.solr.handler.component",
152-
"org.apache.solr.update.processor",
153-
"org.apache.solr.util"
154-
]
155-
}
142+
configure(project(":solr:test-framework")) {
143+
project.tasks.withType(RenderJavadocTask) {
144+
// TODO: clean up split packages
145+
javadocMissingIgnore = [
146+
"org.apache.solr",
147+
"org.apache.solr.analysis",
148+
"org.apache.solr.cloud",
149+
"org.apache.solr.core",
150+
"org.apache.solr.handler.component",
151+
"org.apache.solr.update.processor",
152+
"org.apache.solr.util"
153+
]
156154
}
157155
}
158156

@@ -161,16 +159,14 @@ if (!skipSolr) {
161159
// See: https://issues.apache.org/jira/browse/LUCENE-8738?focusedCommentId=16818106&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16818106
162160

163161
// Disable Javadoc rendering for these projects.
164-
if (!skipSolr) {
165-
configure(subprojects.findAll {
166-
it.path in [
167-
':solr:solr-ref-guide',
168-
':solr:server',
169-
':solr:webapp']
170-
}) {
171-
project.tasks.withType(RenderJavadocTask) {
172-
enabled = false
173-
}
162+
configure(subprojects.findAll {
163+
it.path in [
164+
':solr:solr-ref-guide',
165+
':solr:server',
166+
':solr:webapp']
167+
}) {
168+
project.tasks.withType(RenderJavadocTask) {
169+
enabled = false
174170
}
175171
}
176172

@@ -217,9 +213,8 @@ class RenderJavadocTask extends DefaultTask {
217213
@Input
218214
def luceneDocUrl = "${-> project.luceneDocUrl }"
219215

220-
// SOLR ONLY
221216
@Input
222-
def solrDocUrl = "${-> project.skipSolr ? null : project.solrDocUrl }"
217+
def solrDocUrl = "${-> project.solrDocUrl }"
223218

224219
// default is to require full javadocs
225220
@Input

0 commit comments

Comments
 (0)