Apache Solr open-source search software
SOLR-15603: Add an option to activate Gradle build cache, build task cleanups (#277)
Alexis Tualc3bef8cde5eb
diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradleindex 61cd8afc6ed..27cc73d9feb 100644--- a/gradle/documentation/render-javadoc.gradle+++ b/gradle/documentation/render-javadoc.gradle@@ -188,11 +188,13 @@ configure(subprojects) {}}+@CacheableTaskclass RenderJavadocTask extends DefaultTask {@InputFiles+ @PathSensitive(PathSensitivity.RELATIVE)@SkipWhenEmptySourceDirectorySet srcDirSet;-+@OutputDirectoryFile outputDir@@ -258,10 +260,10 @@ class RenderJavadocTask extends DefaultTask {public void render() {def srcDirs = srcDirSet.srcDirs.findAll { dir -> dir.exists() }def optionsFile = project.file("${getTemporaryDir()}/javadoc-options.txt")-+// create the directory, so relative link calculation knows that it's a directory:outputDir.mkdirs();-+def opts = []opts << [ '-overview', project.file("${srcDirs[0]}/overview.html") ]opts << [ '-sourcepath', srcDirs.join(File.pathSeparator) ]@@ -336,7 +338,7 @@ class RenderJavadocTask extends DefaultTask {}}}-+// Add offline links.allOfflineLinks.each { url, dir ->// Some sanity check/ validation here to ensure dir/package-list or dir/element-list is present.diff --git a/gradle/generation/local-settings.gradle b/gradle/generation/local-settings.gradleindex f41ad031aa9..1fd1f72291e 100644--- a/gradle/generation/local-settings.gradle+++ b/gradle/generation/local-settings.gradle@@ -55,6 +55,11 @@ org.gradle.jvmargs=-Xmx3g \\org.gradle.parallel=trueorg.gradle.priority=normal+# This setting enables local task output caches. This will speed up+# your local builds in most cases but will also consume disk space in your+# gradle home. See SOLR-15603 for details.+# org.gradle.caching=true+# Silence gradle warnings. We'll deal with them when we upgrade the wrapper.org.gradle.warning.mode=nonediff --git a/gradle/validation/check-broken-links.gradle b/gradle/validation/check-broken-links.gradleindex 9aabcd3dd9f..d032f4141c1 100644--- a/gradle/validation/check-broken-links.gradle+++ b/gradle/validation/check-broken-links.gradle@@ -29,22 +29,27 @@ configure(project(':solr:documentation')) {check.dependsOn checkBrokenLinks}+@CacheableTaskclass CheckBrokenLinksTask extends DefaultTask {// wraps input directory location in DirectoryProperty so as to lazily evaluate 'docroot' property// (see gradle/documentation/documentation.gradle)@InputDirectory+ @PathSensitive(PathSensitivity.RELATIVE)final DirectoryProperty docsDir = project.objects.directoryProperty().fileProvider(project.providers.provider { project.docroot })@InputFile+ @PathSensitive(PathSensitivity.RELATIVE)File script = project.rootProject.file("dev-tools/scripts/checkJavadocLinks.py")+ @OutputFile+ Provider<RegularFile> outputFile = project.layout.buildDirectory.file('check-broken-links-output.txt')+@TaskActiondef check() {- def outputFile = project.file("${getTemporaryDir()}/check-broken-links-output.txt")def result- outputFile.withOutputStream { output ->+ outputFile.get().asFile.withOutputStream { output ->result = project.exec {executable project.externalTool("python3")ignoreExitValue = truediff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 45b68e764be..b6a4fdc2d78 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -145,6 +145,8 @@ when told to. The admin UI now tells it to. (Nazerke Seidan, David Smiley)Other Changes----------------------+* SOLR-15603: Add an option to activate Gradle build cache, build task cleanups (Alexis Tual, Dawid Weiss)+* SOLR-14656: Autoscaling framework removed (Ishan Chattopadhyaya, noble, Ilan Ginzburg)* SOLR-14616: CDCR support removed (Ishan Chattopadhyaya)diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradleindex 866ed52ee8f..6b6ab62b6ae 100644--- a/solr/solr-ref-guide/build.gradle+++ b/solr/solr-ref-guide/build.gradle@@ -184,6 +184,7 @@ ext {group "Documentation"description "Builds the ${details.desc}"+ outputs.cacheIf { true }inputs.dir contentDiroutputs.dir htmlDir@@ -215,20 +216,22 @@ check.dependsOn checkLocalJavadocLinksSite, checkSite// Hook site building to assemble.assemble.dependsOn buildSite-class PrepareSources extends DefaultTask {+@CacheableTask+abstract class PrepareSources extends DefaultTask {// Original Source files we'll be syncing <b>FROM</b>@InputDirectory- final DirectoryProperty srcDir = project.objects.directoryProperty()+ @PathSensitive(PathSensitivity.RELATIVE)+ abstract DirectoryProperty getSrcDir()// Destination folder.@OutputDirectory- final DirectoryProperty outDir = project.objects.directoryProperty()+ abstract DirectoryProperty getOutDir()/*** Task specific props (lazy provider)*/@Input- final MapProperty<String, String> props = project.objects.mapProperty(String, String)+ abstract MapProperty<String, String> getProps()public PrepareSources() {// setup 'dependsOn classes, configurations.depVer' here