data: update Java dependencies to add support for Java 13, 14 and 15 (#1152)
* updated java indexer dependencies * replaced old gradle tooling jar that is shipped with Sourcetrail because it is not working for new JRE versions anymore * fixed crash in Java indexer * added language standard sleection for Java 13, 14 and 15 * fixed console logging for recent jdk versions
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+35
-35
@@ -28,12 +28,12 @@
|
||||
<repository>
|
||||
<id>mvnrepository</id>
|
||||
<name>mvnrepository</name>
|
||||
<url>http://www.mvnrepository.com</url>
|
||||
<url>https://www.mvnrepository.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>repo_gradle</id>
|
||||
<name>repo_gradle</name>
|
||||
<url>http://repo.gradle.org/gradle/libs-releases-local</url>
|
||||
<url>https://repo.gradle.org/gradle/libs-releases-local</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
@@ -41,121 +41,121 @@
|
||||
<dependency>
|
||||
<groupId>org.gradle</groupId>
|
||||
<artifactId>gradle-tooling-api</artifactId>
|
||||
<version>4.2</version>
|
||||
<version>6.7.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/gradle-tooling-api-4.2.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/gradle-tooling-api-6.7.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
<artifactId>org.eclipse.core.commands</artifactId>
|
||||
<version>3.9.500</version>
|
||||
<version>3.9.800</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.commands-3.9.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.commands-3.9.800.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
<artifactId>org.eclipse.core.contenttype</artifactId>
|
||||
<version>3.7.400</version>
|
||||
<version>3.7.800</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.contenttype-3.7.400.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.contenttype-3.7.800.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
<artifactId>org.eclipse.core.expressions</artifactId>
|
||||
<version>3.6.500</version>
|
||||
<version>3.7.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.expressions-3.6.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.expressions-3.7.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
<artifactId>org.eclipse.core.filesystem</artifactId>
|
||||
<version>1.7.500</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.filesystem-1.7.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.filesystem-1.7.700.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
<artifactId>org.eclipse.core.jobs</artifactId>
|
||||
<version>3.10.500</version>
|
||||
<version>3.10.1000</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.jobs-3.10.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.jobs-3.10.1000.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
<artifactId>org.eclipse.core.resources</artifactId>
|
||||
<version>3.13.500</version>
|
||||
<version>3.13.900</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.resources-3.13.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.resources-3.13.900.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.core</groupId>
|
||||
<artifactId>org.eclipse.core.runtime</artifactId>
|
||||
<version>3.16.0</version>
|
||||
<version>3.20.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.runtime-3.16.0.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.core.runtime-3.20.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.equinox</groupId>
|
||||
<artifactId>org.eclipse.equinox.app</artifactId>
|
||||
<version>1.4.300</version>
|
||||
<version>1.5.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.app-1.4.300.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.app-1.5.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.equinox</groupId>
|
||||
<artifactId>org.eclipse.equinox.common</artifactId>
|
||||
<version>3.10.500</version>
|
||||
<version>3.14.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.common-3.10.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.common-3.14.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.equinox</groupId>
|
||||
<artifactId>org.eclipse.equinox.preferences</artifactId>
|
||||
<version>3.7.500</version>
|
||||
<version>3.8.100</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.preferences-3.7.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.preferences-3.8.100.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.equinox</groupId>
|
||||
<artifactId>org.eclipse.equinox.registry</artifactId>
|
||||
<version>3.8.500</version>
|
||||
<version>3.10.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.registry-3.8.500.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.equinox.registry-3.10.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jdt</groupId>
|
||||
<artifactId>org.eclipse.jdt.core</artifactId>
|
||||
<version>3.19.0</version>
|
||||
<version>3.24.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.jdt.core-3.19.0.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.jdt.core-3.24.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<version>3.15.0</version>
|
||||
<version>3.16.100</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.osgi-3.15.0.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.osgi-3.16.100.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse</groupId>
|
||||
<artifactId>org.eclipse.text</artifactId>
|
||||
<version>3.9.0</version>
|
||||
<version>3.10.400</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/org.eclipse.text-3.9.0.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/org.eclipse.text-3.10.400.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.10</version>
|
||||
<version>1.7.28</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/slf4j-api-1.7.10.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/slf4j-api-1.7.28.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>1.7.10</version>
|
||||
<version>1.7.30</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/slf4j-simple-1.7.10.jar</systemPath>
|
||||
<systemPath>${basedir}/lib/slf4j-simple-1.7.30.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -410,7 +410,7 @@ public abstract class AstVisitor extends ASTVisitor
|
||||
{
|
||||
DeclName symbolName = DeclName.unsolved();
|
||||
IBinding binding = node.resolveBinding();
|
||||
if (!binding.isRecovered())
|
||||
if (binding != null && !binding.isRecovered())
|
||||
{
|
||||
if (binding instanceof IPackageBinding)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ public class JavaIndexer
|
||||
|
||||
Path path = Paths.get(filePath);
|
||||
|
||||
ASTParser parser = ASTParser.newParser(AST.JLS12);
|
||||
ASTParser parser = ASTParser.newParser(AST.JLS_Latest);
|
||||
|
||||
parser.setResolveBindings(
|
||||
true); // solve "bindings" like the declaration of the type used in a var decl
|
||||
@@ -73,7 +73,7 @@ public class JavaIndexer
|
||||
astVisitorClient.logInfo("using language standard " + convertedLanguageStandard);
|
||||
|
||||
Hashtable<String, String> options = JavaCore.getOptions();
|
||||
options.put(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
|
||||
options.put(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.DISABLED);
|
||||
options.put(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, JavaCore.IGNORE);
|
||||
options.put(JavaCore.COMPILER_SOURCE, convertedLanguageStandard);
|
||||
options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, convertedLanguageStandard);
|
||||
@@ -164,7 +164,7 @@ public class JavaIndexer
|
||||
{
|
||||
String packageName = "";
|
||||
|
||||
ASTParser parser = ASTParser.newParser(AST.JLS12);
|
||||
ASTParser parser = ASTParser.newParser(AST.JLS_Latest);
|
||||
parser.setKind(
|
||||
ASTParser.K_COMPILATION_UNIT); // specify to parse the entire compilation unit
|
||||
parser.setSource(fileContent.toCharArray());
|
||||
@@ -209,8 +209,14 @@ public class JavaIndexer
|
||||
case "11":
|
||||
return JavaCore.VERSION_11;
|
||||
case "12":
|
||||
default:
|
||||
return JavaCore.VERSION_12;
|
||||
case "13":
|
||||
return JavaCore.VERSION_13;
|
||||
case "14":
|
||||
return JavaCore.VERSION_14;
|
||||
case "15":
|
||||
default:
|
||||
return JavaCore.VERSION_15;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user