Convert generators to intellij plugin, clean up dependencies
This commit is contained in:
committed by
Vyacheslav Gerasimov
parent
0d264793ce
commit
9b51a547d8
+11
-15
@@ -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 {
|
||||
|
||||
@@ -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<String> foundEntries = Sets.newHashSet();
|
||||
Set<String> foundEntries = new HashSet<>();
|
||||
|
||||
List<JarEntry> sourceList = Collections.list(sourceJar.entries());
|
||||
for (JarEntry entry : sourceList) {
|
||||
@@ -313,7 +309,7 @@ public class GenerateMockJdk {
|
||||
sourceJar.close();
|
||||
|
||||
if (assertAllFound) {
|
||||
Set<String> notFound = Sets.newHashSet(entryNamesToInclude);
|
||||
Set<String> 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<String> getSourceFileEntries() {
|
||||
Set<String> entrySet = Sets.newHashSet();
|
||||
Set<String> 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<String> getClassFileEntries() {
|
||||
return Sets.newHashSet(Arrays.asList(ENTRIES));
|
||||
return new HashSet<>(Arrays.asList(ENTRIES));
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user