void (@NotNull final List<String> classpath) { if (myGradleClasspath == null) { myGradleClasspath = new ArrayList<>(); String gradleToolingApiJarPath = PathUtil.getJarPathForClass(ProjectConnection.class); if (!StringUtil.isEmpty(gradleToolingApiJarPath)) { myGradleClasspath.add(gradleToolingApiJarPath); } String gradleToolingApiImplDepJarPath = PathUtil.getJarPathForClass(Optional.class); if (!StringUtil.isEmpty(gradleToolingApiImplDepJarPath)) { myGradleClasspath.add(gradleToolingApiImplDepJarPath); } } classpath.addAll(myGradleClasspath); }