Apache Solr open-source search software
Removing and cleaning up build conditionals introduced before lucene/solr repo split.
Dawid Weissb96c39fa3c62
diff --git a/build.gradle b/build.gradleindex a6f8059c808..1756ffdc358 100644--- a/build.gradle+++ b/build.gradle@@ -152,9 +152,6 @@ apply from: file('gradle/validation/solr.config-file-sanity.gradle')// Source or data regeneration tasksapply from: file('gradle/generation/javacc.gradle')-// Shared configuration of subprojects containing native code.-apply from: file('gradle/native/disable-native.gradle')-// Additional development aids.apply from: file('gradle/maven/maven-local.gradle')apply from: file('gradle/testing/per-project-summary.gradle')diff --git a/gradle/documentation/documentation.gradle b/gradle/documentation/documentation.gradleindex db492dce302..08fea98a898 100644--- a/gradle/documentation/documentation.gradle+++ b/gradle/documentation/documentation.gradle@@ -144,7 +144,7 @@ configure(project(':solr:documentation')) {}}-configure(subprojects.findAll { it.path == ':lucene' || it.path == ':solr' }) {+configure(project(":solr")) {ext {docroot = project('documentation').docrootdocrootMinimal = project('documentation').docrootMinimaldiff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradleindex 0ab9fcf002e..91b43f02663 100644--- a/gradle/documentation/render-javadoc.gradle+++ b/gradle/documentation/render-javadoc.gradle@@ -321,8 +321,7 @@ class RenderJavadocTask extends DefaultTask {opts << ['-link', relative]} else {// For absolute links, we determine the target URL by assembling the full URL.- def base = otherProject.path.startsWith(":lucene") ? luceneDocUrl : solrDocUrl- allOfflineLinks.put("${base}/${otherProject.relativeDocPath}/".toString(), otherTask.outputDir)+ allOfflineLinks.put("${solrDocUrl}/${otherProject.relativeDocPath}/".toString(), otherTask.outputDir)}}}diff --git a/gradle/jar-manifest.gradle b/gradle/jar-manifest.gradleindex a2a4be3b34c..ea885fefe95 100644--- a/gradle/jar-manifest.gradle+++ b/gradle/jar-manifest.gradle@@ -20,18 +20,9 @@subprojects {// Declare these inline for now. Don't know if it makes sense to declare them// per-project.- def title;- def implementationTitle;- def legaleseDir;- if (project.path.startsWith(":lucene")) {- implementationTitle = "org.apache.lucene"- title = "Lucene Search Engine: ${project.name}"- legaleseDir = project(":lucene").projectDir- } else {- implementationTitle = "org.apache.solr"- title = "Apache Solr Search Server: ${project.name}"- legaleseDir = project(":solr").projectDir- }+ def title = "Apache Solr Search Server: ${project.name}"+ def implementationTitle = "org.apache.solr"+ def legaleseDir = project(":solr").projectDir// Apply the manifest to any JAR or WAR file created by any project,// excluding those explicitly listed.diff --git a/gradle/maven/defaults-maven.gradle b/gradle/maven/defaults-maven.gradleindex 443d6904f0a..3ee7d1956cc 100644--- a/gradle/maven/defaults-maven.gradle+++ b/gradle/maven/defaults-maven.gradle@@ -24,39 +24,6 @@configure(rootProject) {ext {published = [- ":lucene:analysis:common",- ":lucene:analysis:icu",- ":lucene:analysis:kuromoji",- ":lucene:analysis:morfologik",- ":lucene:analysis:nori",- ":lucene:analysis:opennlp",- ":lucene:analysis:phonetic",- ":lucene:analysis:smartcn",- ":lucene:analysis:stempel",- ":lucene:backward-codecs",- ":lucene:benchmark",- ":lucene:classification",- ":lucene:codecs",- ":lucene:core",- ":lucene:demo",- ":lucene:expressions",- ":lucene:facet",- ":lucene:grouping",- ":lucene:highlighter",- ":lucene:join",- ":lucene:luke",- ":lucene:memory",- ":lucene:misc",- ":lucene:monitor",- ":lucene:queries",- ":lucene:queryparser",- ":lucene:replicator",- ":lucene:sandbox",- ":lucene:spatial-extras",- ":lucene:spatial3d",- ":lucene:suggest",- ":lucene:test-framework",-":solr:core",":solr:solrj",":solr:contrib:analysis-extras",@@ -123,121 +90,57 @@ configure(subprojects.findAll { it.path in rootProject.published }) { prj ->// in gradle or just complex relationships between lazy collection hooks.gradle.projectsEvaluated {publishing {- def configurePom;- if (project.path.startsWith(":lucene")) {- configurePom = {- name = "Apache Lucene (module: ${project.name})"- description = name- url = 'https://lucene.apache.org/'-- licenses {- license {- name = 'Apache 2'- url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'- }- }-- inceptionYear = "2000"-- issueManagement {- system = "JIRA"- url = "https://issues.apache.org/jira/browse/LUCENE"- }-- ciManagement {- system = "Jenkins"- url = "https://builds.apache.org/job/Lucene/"+ def configurePom = {+ name = "Apache Solr (module: ${project.name})"+ description = name+ url = 'https://solr.apache.org/'++ licenses {+ license {+ name = 'Apache 2'+ url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'}+ }- mailingLists {- mailingList {- name = "General List"- subscribe = "[email protected]"- unsubscribe = "[email protected]"- archive = "https://mail-archives.apache.org/mod_mbox/lucene-general/"- }-- mailingList {- name = "Java User List"- subscribe = "[email protected]"- unsubscribe = "[email protected]"- archive = "https://mail-archives.apache.org/mod_mbox/lucene-java-user/"- }-- mailingList {- name = "Java Developer List"- subscribe = "[email protected]"- unsubscribe = "[email protected]"- archive = "https://mail-archives.apache.org/mod_mbox/lucene-dev/"- }+ inceptionYear = "2006"- mailingList {- name = "Java Commits List"- subscribe = "[email protected]"- unsubscribe = "[email protected]"- archive = "https://mail-archives.apache.org/mod_mbox/lucene-java-commits/"- }- }-- scm {- connection = 'scm:git:https://gitbox.apache.org/repos/asf/lucene-solr.git'- developerConnection = 'scm:git:https://gitbox.apache.org/repos/asf/lucene-solr.git'- url = 'https://gitbox.apache.org/repos/asf?p=lucene-solr.git'- }+ issueManagement {+ system = "JIRA"+ url = "https://issues.apache.org/jira/browse/SOLR"}- } else {- configurePom = {- name = "Apache Solr (module: ${project.name})"- description = name- url = 'https://lucene.apache.org/solr/'- licenses {- license {- name = 'Apache 2'- url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'- }- }-- inceptionYear = "2006"+ ciManagement {+ system = "Jenkins"+ url = "https://builds.apache.org/job/Solr/"+ }- issueManagement {- system = "JIRA"- url = "https://issues.apache.org/jira/browse/SOLR"+ mailingLists {+ mailingList {+ name = "Solr User List"+ subscribe = "[email protected]"+ unsubscribe = "[email protected]"+ archive = "https://lists.apache.org/[email protected]"}- ciManagement {- system = "Jenkins"- url = "https://builds.apache.org/job/Lucene/"+ mailingList {+ name = "Solr Developer List"+ subscribe = "[email protected]"+ unsubscribe = "[email protected]"+ archive = "https://lists.apache.org/[email protected]"}- mailingLists {- mailingList {- name = "Solr User List"- subscribe = "[email protected]"- unsubscribe = "[email protected]"- archive = "https://mail-archives.apache.org/mod_mbox/solr-user/"- }-- mailingList {- name = "Java Developer List"- subscribe = "[email protected]"- unsubscribe = "[email protected]"- archive = "https://mail-archives.apache.org/mod_mbox/lucene-dev/"- }-- mailingList {- name = "Java Commits List"- subscribe = "[email protected]"- unsubscribe = "[email protected]"- archive = "https://mail-archives.apache.org/mod_mbox/lucene-java-commits/"- }+ mailingList {+ name = "Solr Commits List"+ subscribe = "[email protected]"+ unsubscribe = "[email protected]"+ archive = "https://lists.apache.org/[email protected]"}+ }- scm {- connection = 'scm:git:https://gitbox.apache.org/repos/asf/lucene-solr.git'- developerConnection = 'scm:git:https://gitbox.apache.org/repos/asf/lucene-solr.git'- url = 'https://gitbox.apache.org/repos/asf?p=lucene-solr.git'- }+ scm {+ connection = 'scm:git:https://gitbox.apache.org/repos/asf/solr.git'+ developerConnection = 'scm:git:https://gitbox.apache.org/repos/asf/solr.git'+ url = 'https://gitbox.apache.org/repos/asf?p=solr.git'}}diff --git a/gradle/native/disable-native.gradle b/gradle/native/disable-native.gradledeleted file mode 100644index 3cc239dbacb..00000000000--- a/gradle/native/disable-native.gradle+++ /dev/null@@ -1,84 +0,0 @@-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import org.apache.tools.ant.taskdefs.condition.Os--// This is the master switch to disable all tasks that compile-// native (cpp) code.-rootProject.ext {- buildNative = propertyOrDefault("build.native", false).toBoolean()-}--// Explicitly list all projects that should be configured for native extensions.-// We could scan for projects with a the cpp-library plugin but this is faster.-def nativeProjects = allprojects.findAll {it.path in [- ":lucene:misc:native"-]}--def javaProjectsWithNativeDeps = allprojects.findAll {it.path in [- ":lucene:misc"-]}--// Set up defaults for projects with native dependencies.-configure(javaProjectsWithNativeDeps, {- configurations {- nativeDeps {- attributes {- attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.class, Usage.NATIVE_RUNTIME))- attributes.attribute(CppBinary.OPTIMIZED_ATTRIBUTE, false)- }- }- }-- plugins.withType(JavaPlugin) {- ext {- testOptions += [- [propName: 'tests.native', value: buildNative, description: "Enable tests that require native extensions."]- ]-- nativeDepsDir = file("${buildDir}/nativeDeps")- }-- // Only copy and attach native deps if native build is enabled.- if (buildNative && Os.isFamily(Os.FAMILY_WINDOWS)) {- task copyNativeDeps(type: Sync) {- from configurations.nativeDeps- into nativeDepsDir- }-- tasks.withType(Test) {- dependsOn copyNativeDeps- systemProperty "java.library.path", nativeDepsDir- }- }- }-})--// If native build is disabled we just disable all tasks in the active task set that-// originate from "native" projects.-//-// Perhaps there is a cleaner way to do it but removing their references from-// settings.gradle would remove them from IDE detection, dependency resolution, etc.-// This way seems better.-if (!buildNative) {- gradle.taskGraph.whenReady { taskGraph ->- def tasks = taskGraph.getAllTasks()- tasks.findAll { task -> task.project in nativeProjects }.each { task ->- task.enabled = false- }- }-}diff --git a/gradle/validation/forbidden-apis.gradle b/gradle/validation/forbidden-apis.gradleindex c23002ae88f..3d6840697bc 100644--- a/gradle/validation/forbidden-apis.gradle+++ b/gradle/validation/forbidden-apis.gradle@@ -108,9 +108,6 @@ allprojects { prj ->// Disable sysout signatures for these projects.if (prj.path in [- ":lucene:demo",- ":lucene:benchmark",- ":lucene:test-framework",":solr:solr-ref-guide",":solr:test-framework"]) {@@ -119,17 +116,6 @@ allprojects { prj ->]}- // Configure lucene-specific rules.- if (prj.path.startsWith(":lucene")) {- forbiddenApisMain {- doFirst dynamicSignatures.curry(configurations.compileClasspath, "lucene")- }-- forbiddenApisTest {- doFirst dynamicSignatures.curry(configurations.testCompileClasspath, "lucene")- }- }-// Configure solr-specific rules.if (prj.path.startsWith(":solr")) {forbiddenApisMain {