eclipse-lsp4j / lsp4j

A Java implementation of the language server protocol intended to be consumed by tools and language servers implemented in Java.

Home Page:https://eclipse.org/lsp4j

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There's no need to package `*.java` files into the runtime jar

raylras opened this issue · comments

  • Including *.java files in the runtime jar makes it larger, but they are unnecessary during runtime.
  • It causes confusion when browsing the LSP4J source code in IDEA, as it results in duplicate classes.
    image

Solution:

  • Simply remove the contents of org.eclipse.lsp4j/build.gradle lines 27-29:
@@ -24,10 +24,6 @@
 	testImplementation "com.tngtech.archunit:archunit:$versions.archunit"
 }
 
-jar {
-	from sourceSets.main.allJava
-}
-
 jar.bnd (
 	'Import-Package': "com.google.gson.*;version=\"$versions.gson\",*"
 )

Great idea. Can you provide a PR please? We need to also check that the various sources jars still have all the sources after making the change.

Fixed by #764