Implement correct and fast ultimate/community sdks handling

This commit is contained in:
Ilya Chernikov
2017-12-22 19:04:06 +01:00
committed by Vyacheslav Gerasimov
parent 6f1e6f1f1b
commit 5dc094d290
26 changed files with 204 additions and 81 deletions
@@ -4,6 +4,7 @@ description = "Kotlin AllOpen Compiler Plugin"
apply { plugin("kotlin") }
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compileOnly(project(":compiler:plugin-api"))
@@ -11,6 +11,7 @@ dependencies {
compile(project(":compiler:frontend"))
compile(project(":compiler:cli-common"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-jps-common"))
compile(project(":plugins:annotation-based-compiler-plugins-ide-support"))
compileOnly(intellijDep()) { includeJars("openapi", "idea") }
@@ -9,10 +9,14 @@ val androidSdk by configurations.creating
val androidJar by configurations.creating
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":idea:idea-core"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-gradle"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(project(":kotlin-android-extensions-runtime"))
@@ -31,9 +35,9 @@ dependencies {
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testRuntime(projectDist(":kotlin-reflect"))
testCompile(intellijPluginDep("android")) { includeJars("android.jar", "android-common.jar", "sdk-common.jar", "sdk-tools.jar") }
testCompile(intellijPluginDep("Groovy")) { includeJars("Groovy.jar") }
testCompile(intellijDep()) { includeJars("extensions.jar") }
testCompile(intellijPluginDep("android")) { includeJars("android", "android-common", "sdk-common", "sdk-tools") }
testCompile(intellijPluginDep("Groovy")) { includeJars("Groovy") }
testCompile(intellijDep()) { includeJars("extensions") }
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":plugins:android-extensions-jps"))
@@ -41,7 +45,6 @@ dependencies {
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":plugins:lint"))
testRuntime(intellijDep())
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("properties"))
@@ -70,6 +73,7 @@ projectTest {
doFirst {
systemProperty("android.sdk", androidSdk.singleFile.canonicalPath)
systemProperty("android.jar", androidJar.singleFile.canonicalPath)
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
@@ -4,6 +4,9 @@ apply { plugin("kotlin") }
val androidSdk by configurations.creating
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":jps-plugin"))
compile(project(":plugins:android-extensions-compiler"))
@@ -18,10 +21,9 @@ dependencies {
testCompile(projectTests(":kotlin-build-common"))
testCompileOnly(intellijDep()) { includeJars("openapi", "jps-builders") }
testCompileOnly(intellijDep("jps-build-test")) { includeJars("jps-build-test") }
testCompileOnly(intellijDep()) { includeJars("jps-model") }
testRuntime(intellijPluginDep("android"))
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testRuntime(intellijDep("jps-build-test"))
testRuntime(intellijDep("jps-standalone"))
@@ -37,6 +39,7 @@ projectTest {
workingDir = rootDir
doFirst {
systemProperty("android.sdk", androidSdk.singleFile.canonicalPath)
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
@@ -8,6 +8,7 @@ dependencies {
compile(project(":compiler:frontend"))
compile(project(":compiler:cli-common"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-jps-common"))
compile(project(":idea:idea-gradle"))
compile(project(":idea:idea-maven"))
@@ -4,8 +4,8 @@ description = "Annotation Processor for Kotlin"
apply { plugin("kotlin") }
dependencies {
testRuntime(intellijDep())
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "openapi") }
compile(project(":compiler:util"))
+1
View File
@@ -7,6 +7,7 @@ apply {
dependencies {
compile(project(":compiler:frontend"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-core"))
compile(project(":idea:idea-android"))
compile(project(":plugins:uast-kotlin"))
+1
View File
@@ -4,6 +4,7 @@ description = "Kotlin NoArg Compiler Plugin"
apply { plugin("kotlin") }
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compileOnly(project(":compiler:frontend"))
@@ -4,22 +4,22 @@ description = "Kotlin SamWithReceiver Compiler Plugin"
apply { plugin("kotlin") }
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compileOnly(project(":compiler:frontend"))
compileOnly(project(":compiler:frontend.java"))
compileOnly(project(":compiler:plugin-api"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
runtime(projectRuntimeJar(":kotlin-compiler"))
runtime(projectDist(":kotlin-stdlib"))
runtime(projectDist(":kotlin-reflect"))
// TODO: find out whether it is important, and if yes - why it breaks tests and how to fix it
// runtime(projectRuntimeJar(":kotlin-compiler"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:tests-common"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
}
sourceSets {
@@ -46,5 +46,6 @@ ideaPlugin {
}
projectTest {
dependsOn(":prepare:mock-runtime-for-test:dist")
workingDir = rootDir
}
@@ -14,6 +14,8 @@ dependencies {
compile(project(":idea:idea-core"))
compile(project(":idea:idea-android"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(intellijDep()) { includeJars("openapi", "extensions", "util") }
}
sourceSets {
+3
View File
@@ -43,4 +43,7 @@ testsJar {}
projectTest {
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}