Skip to content

Apache Lucene open-source search software

eclipse: attach javadocs URL for gradle-api.jar (#14879)

Robert Muir6071569926f2
diff --git a/build-tools/build-infra/src/main/groovy/lucene.ide.eclipse.gradle b/build-tools/build-infra/src/main/groovy/lucene.ide.eclipse.gradle
index 1b58e809dd0..05c3c4ef535 100644
--- a/build-tools/build-infra/src/main/groovy/lucene.ide.eclipse.gradle
+++ b/build-tools/build-infra/src/main/groovy/lucene.ide.eclipse.gradle
@@ -57,11 +57,16 @@ if (gradle.startParameter.taskNames.contains("eclipse")) {
return it.kind == "src" || (it.kind == "lib" && it.getPath() ==~ /(.+)lucene-.*\.jar/)
}
- // I'm not sure what these attributes are supposed to do. Keeping the previous version of having no-attributes.
+ // Wipe attributes which only contain a blank "gradle_used_by_scope" for every single library.
classpath.entries.each {
if (it.kind == "lib") {
it.getEntryAttributes().clear()
}
+ // The generated gradle-api.jar has no source attached, attaching source is a PITA
+ // for now just attach a javadocs URL, which improves editor functionality:
+ if (it.getPath() ==~ /(.+)gradle-api-.*\.jar/) {
+ it.getEntryAttributes().put("javadoc_location", "https://docs.gradle.org/${deps.versions.minGradle.get()}/javadoc")
+ }
}
def projects = allprojects.findAll { prj ->