This is an automated email from the ASF dual-hosted git repository.
mdrob pushed a commit to branch jira/solr-15556-antora
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/jira/solr-15556-antora by this
push:
new d53df34 Exclude .gradle directory from source patterns and rat
d53df34 is described below
commit d53df34baddaeed788b0a542b2b47a96b4a2cc00
Author: Mike Drob <[email protected]>
AuthorDate: Wed Jan 26 10:07:51 2022 -0600
Exclude .gradle directory from source patterns and rat
---
gradle/validation/rat-sources.gradle | 6 ++++--
gradle/validation/validate-source-patterns.gradle | 6 ++----
solr/solr-ref-guide/build.gradle | 12 ------------
3 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/gradle/validation/rat-sources.gradle
b/gradle/validation/rat-sources.gradle
index c422ba8..fc823e0 100644
--- a/gradle/validation/rat-sources.gradle
+++ b/gradle/validation/rat-sources.gradle
@@ -46,12 +46,14 @@ allprojects {
// At the module scope we only check selected file patterns as
folks have various .gitignore-d resources
// generated by IDEs, etc.
- include "**/*.gradle"
include "**/*.xml"
include "**/*.md"
include "**/*.py"
include "**/*.sh"
include "**/*.bat"
+ // include build.gradle but exclude .gradle directories
+ include "**/*.gradle"
+ exclude ".gradle/**"
// Include selected patterns from any source folders. We could
make this
// relative to source sets but it seems to be of little value -
all our source sets
@@ -80,7 +82,6 @@ allprojects {
case ":":
include "gradlew"
include "gradlew.bat"
- exclude ".gradle"
exclude ".idea"
exclude ".muse"
exclude ".git"
@@ -135,6 +136,7 @@ allprojects {
case ":solr:solr-ref-guide":
exclude "src/**"
+ exclude "node_modules/**"
break
case ":solr:docker":
diff --git a/gradle/validation/validate-source-patterns.gradle
b/gradle/validation/validate-source-patterns.gradle
index e09a925..ff5c1df 100644
--- a/gradle/validation/validate-source-patterns.gradle
+++ b/gradle/validation/validate-source-patterns.gradle
@@ -80,14 +80,11 @@ allprojects {
// default excludes.
exclude '**/build/**'
exclude '**/.idea/**'
+ exclude '**/.gradle/**'
if (project == rootProject) {
// ourselves :-)
exclude 'gradle/validation/validate-source-patterns.gradle'
-
- // gradle and idea folders.
- exclude '.gradle/**'
- exclude '.idea/**'
} else {
// ignore txt files in source resources and tests.
exclude 'src/**/*.txt'
@@ -121,6 +118,7 @@ configure(project(':solr:server')) {
configure(project(':solr:solr-ref-guide')) {
project.tasks.withType(ValidateSourcePatternsTask) {
sourceFiles.exclude 'modules/indexing-guide/examples/stemdict.txt' //
requires tabs
+ sourceFiles.exclude 'node_modules/**' // slightly hackish, this downloads
all of the node deps
}
}
diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradle
index 1ba439f..a3d0bfd 100644
--- a/solr/solr-ref-guide/build.gradle
+++ b/solr/solr-ref-guide/build.gradle
@@ -299,18 +299,6 @@ node {
// Antora plugin depends on an old version of node, force a newer one
download = true
version = "16.13.2" // LTS
-
- // This is where we will save node, npm, and npx if not already present on
the system
- workDir = file("${project.buildDir}/nodejs")
-
- // TODO figure out how to configure which directory npm will install into
and then read from
- // This currently calls "npm install
@antora/site-generator-default@`antoraVersion`"
- //
https://gitlab.com/antora/antora-gradle-plugin/-/blob/main/src/main/java/io/github/rwinch/antora/AntoraPlugin.java#L61
- // If we were launching commands directly I think we could do `npm install
--prefix $dir` and `npx -w $dir`
- npmWorkDir = file("${project.buildDir}/npm") // this doesn't seem to do it
-
- // This would move package.json and node_modules to a different location,
but antora also expects playbook file to be in the same location
- // nodeProjectDir = file("${project.buildDir}/node-project")
}