diff --git a/generators/build.gradle.kts b/generators/build.gradle.kts index a9d8c9e8a0a..964bec32752 100644 --- a/generators/build.gradle.kts +++ b/generators/build.gradle.kts @@ -1,6 +1,10 @@ apply { plugin("kotlin") } +configureIntellijPlugin { + setExtraDependencies("jps-build-test") +} + dependencies { compile(protobufFull()) compile(project(":idea")) @@ -36,26 +40,18 @@ dependencies { compile(projectTests(":plugins:uast-kotlin")) compile(projectTests(":js:js.tests")) compile(projectTests(":generators:test-generator")) - compile(ideaSdkDeps("jps-build-test", subdir = "jps/test")) compileOnly(project(":kotlin-reflect-api")) testCompile(project(":idea:idea-test-framework")) { isTransitive = false } testCompile(project(":compiler:incremental-compilation-impl")) testCompile(commonDep("junit:junit")) - testCompile(ideaSdkDeps("openapi", "idea")) testRuntime(projectDist(":kotlin-reflect")) - testRuntime(ideaSdkDeps("*.jar")) - testRuntime(ideaPluginDeps("idea-junit", "resources_en", plugin = "junit")) - testRuntime(ideaPluginDeps("IntelliLang", plugin = "IntelliLang")) - testRuntime(ideaPluginDeps("jcommander", "testng", "testng-plugin", "resources_en", plugin = "testng")) - testRuntime(ideaPluginDeps("copyright", plugin = "copyright")) - testRuntime(ideaPluginDeps("properties", "resources_en", plugin = "properties")) - testRuntime(ideaPluginDeps("java-i18n", plugin = "java-i18n")) - testRuntime(ideaPluginDeps("*.jar", plugin = "gradle")) - testRuntime(ideaPluginDeps("*.jar", plugin = "Groovy")) - testRuntime(ideaPluginDeps("coverage", "jacocoant", plugin = "coverage")) - testRuntime(ideaPluginDeps("java-decompiler", plugin = "java-decompiler")) - testRuntime(ideaPluginDeps("*.jar", plugin = "maven")) - testRuntime(ideaPluginDeps("*.jar", plugin = "android")) +} + +afterEvaluate { + dependencies { + compile(intellijExtra("jps-build-test")) + testRuntime(intellij { include("idea_rt.jar") }) + } } sourceSets { diff --git a/generators/src/org/jetbrains/kotlin/generators/mockJDK/GenerateMockJdk.java b/generators/src/org/jetbrains/kotlin/generators/mockJDK/GenerateMockJdk.java index e88a742c6e2..57239f67e3c 100644 --- a/generators/src/org/jetbrains/kotlin/generators/mockJDK/GenerateMockJdk.java +++ b/generators/src/org/jetbrains/kotlin/generators/mockJDK/GenerateMockJdk.java @@ -16,14 +16,10 @@ package org.jetbrains.kotlin.generators.mockJDK; -import com.google.common.collect.Sets; import com.intellij.openapi.util.io.FileUtil; import java.io.*; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Set; +import java.util.*; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.JarOutputStream; @@ -296,7 +292,7 @@ public class GenerateMockJdk { JarFile sourceJar = new JarFile(source); JarOutputStream targetJar = new JarOutputStream(new FileOutputStream(target)); - Set foundEntries = Sets.newHashSet(); + Set foundEntries = new HashSet<>(); List sourceList = Collections.list(sourceJar.entries()); for (JarEntry entry : sourceList) { @@ -313,7 +309,7 @@ public class GenerateMockJdk { sourceJar.close(); if (assertAllFound) { - Set notFound = Sets.newHashSet(entryNamesToInclude); + Set notFound = new HashSet<>(entryNamesToInclude); notFound.removeAll(foundEntries); if (!notFound.isEmpty()) { System.err.println("Not found:"); @@ -326,7 +322,7 @@ public class GenerateMockJdk { } private static Set getSourceFileEntries() { - Set entrySet = Sets.newHashSet(); + Set entrySet = new HashSet<>(); for (String entry : ENTRIES) { String javaFile = // "src/" + (in jdk 1.7 under Mac there is no src folder in src.zip) entry.replaceAll(".class$", ".java"); @@ -336,7 +332,7 @@ public class GenerateMockJdk { } private static Set getClassFileEntries() { - return Sets.newHashSet(Arrays.asList(ENTRIES)); + return new HashSet<>(Arrays.asList(ENTRIES)); } public static void main(String[] args) throws IOException { diff --git a/generators/test-generator/build.gradle.kts b/generators/test-generator/build.gradle.kts index 5c34941abb3..b3add25c734 100644 --- a/generators/test-generator/build.gradle.kts +++ b/generators/test-generator/build.gradle.kts @@ -3,12 +3,19 @@ apply { plugin("kotlin") } jvmTarget = "1.6" +configureIntellijPlugin() + dependencies { testCompile(project(":core:util.runtime")) testCompile(projectTests(":compiler:tests-common")) testCompile(projectDist(":kotlin-stdlib")) testCompile(commonDep("junit:junit")) - testCompile(ideaSdkDeps("util")) +} + +afterEvaluate { + dependencies { + compile(intellij { include("util.jar") }) + } } sourceSets {