This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new b96c39f  Removing and cleaning up build conditionals introduced before 
lucene/solr repo split.
b96c39f is described below

commit b96c39fa3c627141be4379559464a7929211084d
Author: Dawid Weiss <dawid.we...@carrotsearch.com>
AuthorDate: Thu Mar 18 09:27:44 2021 +0100

    Removing and cleaning up build conditionals introduced before lucene/solr 
repo split.
---
 build.gradle                               |   3 -
 gradle/documentation/documentation.gradle  |   2 +-
 gradle/documentation/render-javadoc.gradle |   3 +-
 gradle/jar-manifest.gradle                 |  15 +--
 gradle/maven/defaults-maven.gradle         | 175 +++++++----------------------
 gradle/native/disable-native.gradle        |  84 --------------
 gradle/validation/forbidden-apis.gradle    |  14 ---
 7 files changed, 44 insertions(+), 252 deletions(-)

diff --git a/build.gradle b/build.gradle
index a6f8059..1756ffd 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 tasks
 apply 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.gradle
index db492dc..08fea98 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').docroot
     docrootMinimal = project('documentation').docrootMinimal
diff --git a/gradle/documentation/render-javadoc.gradle 
b/gradle/documentation/render-javadoc.gradle
index 0ab9fcf..91b43f0 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.gradle
index a2a4be3..ea885fe 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.gradle
index 443d690..3ee7d19 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 = "general-subscr...@lucene.apache.org"
-                unsubscribe = "general-unsubscr...@lucene.apache.org"
-                archive = 
"https://mail-archives.apache.org/mod_mbox/lucene-general/";
-              }
-
-              mailingList {
-                name = "Java User List"
-                subscribe = "java-user-subscr...@lucene.apache.org"
-                unsubscribe = "java-user-unsubscr...@lucene.apache.org"
-                archive = 
"https://mail-archives.apache.org/mod_mbox/lucene-java-user/";
-              }
-
-              mailingList {
-                name = "Java Developer List"
-                subscribe = "dev-subscr...@lucene.apache.org"
-                unsubscribe = "dev-unsubscr...@lucene.apache.org"
-                archive = 
"https://mail-archives.apache.org/mod_mbox/lucene-dev/";
-              }
+          inceptionYear = "2006"
 
-              mailingList {
-                name = "Java Commits List"
-                subscribe = "commits-subscr...@lucene.apache.org"
-                unsubscribe = "commits-unsubscr...@lucene.apache.org"
-                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 = "users-subscr...@solr.apache.org"
+              unsubscribe = "users-unsubscr...@solr.apache.org"
+              archive = 
"https://lists.apache.org/list.html?us...@solr.apache.org";
             }
 
-            ciManagement {
-              system = "Jenkins"
-              url = "https://builds.apache.org/job/Lucene/";
+            mailingList {
+              name = "Solr Developer List"
+              subscribe = "dev-subscr...@solr.apache.org"
+              unsubscribe = "dev-unsubscr...@solr.apache.org"
+              archive = 
"https://lists.apache.org/list.html?d...@solr.apache.org";
             }
 
-            mailingLists {
-              mailingList {
-                name = "Solr User List"
-                subscribe = "solr-user-subscr...@lucene.apache.org"
-                unsubscribe = "solr-user-unsubscr...@lucene.apache.org"
-                archive = 
"https://mail-archives.apache.org/mod_mbox/solr-user/";
-              }
-
-              mailingList {
-                name = "Java Developer List"
-                subscribe = "dev-subscr...@lucene.apache.org"
-                unsubscribe = "dev-unsubscr...@lucene.apache.org"
-                archive = 
"https://mail-archives.apache.org/mod_mbox/lucene-dev/";
-              }
-
-              mailingList {
-                name = "Java Commits List"
-                subscribe = "commits-subscr...@lucene.apache.org"
-                unsubscribe = "commits-unsubscr...@lucene.apache.org"
-                archive = 
"https://mail-archives.apache.org/mod_mbox/lucene-java-commits/";
-              }
+            mailingList {
+              name = "Solr Commits List"
+              subscribe = "commits-subscr...@solr.apache.org"
+              unsubscribe = "commits-unsubscr...@solr.apache.org"
+              archive = 
"https://lists.apache.org/list.html?commits@solr.apache.org";
             }
+          }
 
-            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.gradle
deleted file mode 100644
index 3cc239d..0000000
--- 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.gradle
index c23002a..3d68406 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 {

Reply via email to