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
+14
View File
@@ -137,6 +137,20 @@ extra["versions.jflex"] = "1.7.0"
val markdownVer = "4054 - Kotlin 1.0.2-dev-566".replace(" ", "%20") // fixed here, was last with "status:SUCCESS,tag:forKotlin"
extra["markdownParserRepo"] = "https://teamcity.jetbrains.com/guestAuth/repository/download/IntelliJMarkdownParser_Build/$markdownVer/([artifact]_[ext]/)[artifact](.[ext])"
fun Project.getBooleanProperty(name: String): Boolean? = this.findProperty("intellijUltimateEnabled")?.let {
val v = it.toString()
if (v.isBlank()) true
else v.toBoolean()
}
val intellijUltimateEnabled = project.getBooleanProperty("intellijUltimateEnabled")
?: project.hasProperty("teamcity")
|| System.getenv("TEAMCITY_VERSION") != null
val intellijSeparateSdks = project.getBooleanProperty("intellijSeparateSdks") ?: false
extra["intellijUltimateEnabled"] = intellijUltimateEnabled
extra["intellijSeparateSdks"] = intellijSeparateSdks
extra["IntellijCoreDependencies"] =
listOf("annotations",
"asm-all",
+12 -1
View File
@@ -31,7 +31,18 @@ plugins {
`kotlin-dsl`
}
extra["intellijUltimateEnabled"] = true
fun Project.getBooleanProperty(name: String): Boolean? = this.findProperty("intellijUltimateEnabled")?.let {
val v = it.toString()
if (v.isBlank()) true
else v.toBoolean()
}
val intellijUltimateEnabled = project.getBooleanProperty("intellijUltimateEnabled")
?: project.hasProperty("teamcity")
|| System.getenv("TEAMCITY_VERSION") != null
val intellijSeparateSdks = project.getBooleanProperty("intellijSeparateSdks") ?: false
extra["intellijUltimateEnabled"] = intellijUltimateEnabled
extra["intellijSeparateSdks"] = intellijSeparateSdks
extra["intellijRepo"] = "https://www.jetbrains.com/intellij-repository"
extra["intellijReleaseType"] = "releases" // or "snapshots"
extra["versions.intellijSdk"] = "172.4343.14"
@@ -11,7 +11,9 @@ val intellijUltimateEnabled: Boolean by rootProject.extra
val intellijRepo: String by rootProject.extra
val intellijReleaseType: String by rootProject.extra
val intellijVersion = rootProject.extra["versions.intellijSdk"] as String
val intellijFlavour = if (intellijUltimateEnabled) "ideaIU" else "ideaIC"
val intellijSeparateSdks: Boolean by rootProject.extra
val installIntellijCommunity = !intellijUltimateEnabled || intellijSeparateSdks
val installIntellijUltimate = intellijUltimateEnabled
repositories {
maven { setUrl("$intellijRepo/$intellijReleaseType") }
@@ -19,6 +21,7 @@ repositories {
}
val intellij by configurations.creating
val intellijUltimate by configurations.creating
val sources by configurations.creating
val `jps-standalone` by configurations.creating
val `jps-build-test` by configurations.creating
@@ -32,12 +35,19 @@ val customDepsRepoModulesDir = File(customDepsRepoDir, "$customDepsOrg/$customDe
val repoDir = customDepsRepoModulesDir
dependencies {
intellij("com.jetbrains.intellij.idea:$intellijFlavour:$intellijVersion")
if (installIntellijCommunity) {
intellij("com.jetbrains.intellij.idea:ideaIC:$intellijVersion")
}
if (installIntellijUltimate) {
intellijUltimate("com.jetbrains.intellij.idea:ideaIU:$intellijVersion")
}
sources("com.jetbrains.intellij.idea:ideaIC:$intellijVersion:sources@jar")
`jps-standalone`("com.jetbrains.intellij.idea:jps-standalone:$intellijVersion")
`jps-build-test`("com.jetbrains.intellij.idea:jps-build-test:$intellijVersion")
`intellij-core`("com.jetbrains.intellij.idea:intellij-core:$intellijVersion")
`plugins-NodeJS`("com.jetbrains.plugins:NodeJS:${rootProject.extra["versions.idea.NodeJS"]}@zip")
if (intellijUltimateEnabled) {
`plugins-NodeJS`("com.jetbrains.plugins:NodeJS:${rootProject.extra["versions.idea.NodeJS"]}@zip")
}
}
fun Task.configureExtractFromConfigurationTask(sourceConfig: Configuration, extractor: (Configuration) -> Any) {
@@ -55,6 +65,8 @@ fun Task.configureExtractFromConfigurationTask(sourceConfig: Configuration, extr
val unzipIntellijSdk by tasks.creating { configureExtractFromConfigurationTask(intellij) { zipTree(it.singleFile) } }
val unzipIntellijUltimateSdk by tasks.creating { configureExtractFromConfigurationTask(intellijUltimate) { zipTree(it.singleFile) } }
val unzipIntellijCore by tasks.creating { configureExtractFromConfigurationTask(`intellij-core`) { zipTree(it.singleFile) } }
val unzipJpsStandalone by tasks.creating { configureExtractFromConfigurationTask(`jps-standalone`) { zipTree(it.singleFile) } }
@@ -81,12 +93,23 @@ fun writeIvyXml(moduleName: String, fileName: String, jarFiles: FileCollection,
}
}
val prepareIvyXml by tasks.creating {
dependsOn(unzipIntellijSdk, unzipIntellijCore, unzipJpsStandalone, copyIntellijSdkSources, copyJpsBuildTest)
val prepareIvyXmls by tasks.creating {
dependsOn(unzipIntellijCore, unzipJpsStandalone, copyIntellijSdkSources, copyJpsBuildTest)
val intellijSdkDir = File(repoDir, intellij.name)
inputs.dir(intellijSdkDir)
outputs.file(File(repoDir, "${intellij.name}.ivy.xml"))
val intellijUltimateSdkDir = File(repoDir, intellijUltimate.name)
if (installIntellijCommunity) {
dependsOn(unzipIntellijSdk)
inputs.dir(intellijSdkDir)
outputs.file(File(repoDir, "${intellij.name}.ivy.xml"))
}
if (installIntellijUltimate) {
dependsOn(unzipIntellijUltimateSdk)
inputs.dir(intellijUltimateSdkDir)
outputs.file(File(repoDir, "${intellijUltimate.name}.ivy.xml"))
}
val flatDeps = listOf(`intellij-core`, `jps-standalone`, `jps-build-test`)
flatDeps.forEach {
@@ -103,12 +126,25 @@ val prepareIvyXml by tasks.creating {
doFirst {
val sourcesFile = File(repoDir, "${sources.name}/${sources.singleFile.name}")
writeIvyXml(intellij.name, intellij.name,
files("$intellijSdkDir/lib/").filter { !it.name.startsWith("kotlin-") },
File(intellijSdkDir, "lib"),
sourcesFile)
File(intellijSdkDir, "plugins").listFiles { it: File -> it.isDirectory }.forEach {
writeIvyXml(it.name, "intellij.plugin.${it.name}", files("$it/lib/"), File(it, "lib"), sourcesFile)
if (installIntellijCommunity) {
writeIvyXml(intellij.name, intellij.name,
files("$intellijSdkDir/lib/").filter { !it.name.startsWith("kotlin-") },
File(intellijSdkDir, "lib"),
sourcesFile)
File(intellijSdkDir, "plugins").listFiles { it: File -> it.isDirectory }.forEach {
writeIvyXml(it.name, "intellij.plugin.${it.name}", files("$it/lib/"), File(it, "lib"), sourcesFile)
}
}
if (installIntellijUltimate) {
writeIvyXml(intellij.name /* important! the module name should be "intellij" */ , intellijUltimate.name,
files("$intellijUltimateSdkDir/lib/").filter { !it.name.startsWith("kotlin-") },
File(intellijUltimateSdkDir, "lib"),
sourcesFile)
File(intellijUltimateSdkDir, "plugins").listFiles { it: File -> it.isDirectory }.forEach {
writeIvyXml(it.name, "intellijUltimate.plugin.${it.name}", files("$it/lib/"), File(it, "lib"), sourcesFile)
}
}
flatDeps.forEach {
@@ -123,7 +159,7 @@ val prepareIvyXml by tasks.creating {
}
val build by tasks.creating {
dependsOn(prepareIvyXml)
dependsOn(prepareIvyXmls)
}
val clean by tasks.creating(Delete::class) {
@@ -1,5 +1,6 @@
@file:Suppress("unused") // usages in build scripts are not tracked properly
import org.gradle.api.GradleException
import org.gradle.api.Project
import org.gradle.api.artifacts.ModuleDependency
import org.gradle.kotlin.dsl.extra
@@ -11,9 +12,13 @@ private fun Project.intellijRepoDir() = File("${project.rootDir.absoluteFile}/bu
fun RepositoryHandler.intellijSdkRepo(project: Project): IvyArtifactRepository = ivy {
val baseDir = project.intellijRepoDir()
setUrl(baseDir)
ivyPattern("${baseDir.canonicalPath}/[organisation]/[revision]/[module]Ultimate.ivy.xml")
ivyPattern("${baseDir.canonicalPath}/[organisation]/[revision]/[module].ivy.xml")
ivyPattern("${baseDir.canonicalPath}/[organisation]/[revision]/intellijUltimate.plugin.[module].ivy.xml")
ivyPattern("${baseDir.canonicalPath}/[organisation]/[revision]/intellij.plugin.[module].ivy.xml")
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/[module]Ultimate/lib/[artifact](-[classifier]).jar")
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/[module]/lib/[artifact](-[classifier]).jar")
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/intellijUltimate/plugins/[module]/lib/[artifact](-[classifier]).jar")
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/intellij/plugins/[module]/lib/[artifact](-[classifier]).jar")
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/plugins-[module]/[module]/lib/[artifact](-[classifier]).jar")
artifactPattern("${baseDir.canonicalPath}/[organisation]/[revision]/[module]/[artifact].jar")
@@ -27,6 +32,10 @@ fun Project.intellijCoreDep() = intellijDep("intellij-core")
fun Project.intellijPluginDep(plugin: String) = intellijDep(plugin)
fun Project.intellijUltimateDep() = intellijDep("intellij")
fun Project.intellijUltimatePluginDep(plugin: String) = intellijDep(plugin)
fun ModuleDependency.includeJars(vararg names: String) {
names.forEach {
artifact {
@@ -43,5 +52,16 @@ fun ModuleDependency.includeIntellijCoreJarDependencies(project: Project) =
fun ModuleDependency.includeIntellijCoreJarDependencies(project: Project, jarsFilterPredicate: (String) -> Boolean) =
includeJars(*(project.rootProject.extra["IntellijCoreDependencies"] as List<String>).filter { jarsFilterPredicate(it) }.toTypedArray())
fun Project.intellijRootDir() = File(intellijRepoDir(), "kotlin.build.custom.deps/${rootProject.extra["versions.intellijSdk"]}/intellij")
fun Project.isIntellijCommunityAvailable() = !(rootProject.extra["intellijUltimateEnabled"] as Boolean) || rootProject.extra["intellijSeparateSdks"] as Boolean
fun Project.isIntellijUltimateSdkAvailable() = (rootProject.extra["intellijUltimateEnabled"] as Boolean)
fun Project.intellijRootDir() =
File(intellijRepoDir(), "kotlin.build.custom.deps/${rootProject.extra["versions.intellijSdk"]}/intellij${if (isIntellijCommunityAvailable()) "" else "Ultimate"}")
fun Project.intellijUltimateRootDir() =
if (isIntellijUltimateSdkAvailable())
File(intellijRepoDir(), "kotlin.build.custom.deps/${rootProject.extra["versions.intellijSdk"]}/intellijUltimate")
else
throw GradleException("intellij ultimate SDK is not available")
+1
View File
@@ -40,6 +40,7 @@ val testJvm6ServerRuntime by configurations.creating
val antLauncherJar by configurations.creating
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep()) // Should come before compiler, because of "progarded" stuff needed for tests
depDistProjects.forEach {
@@ -21,7 +21,7 @@ dependencies {
testCompile(projectTests(":kotlin-build-common"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
testCompile(intellijDep()) { includeJars("annotations.jar") }
testCompile(intellijDep()) { includeJars("annotations", "log4j", "jdom") }
}
sourceSets {
+1
View File
@@ -4,6 +4,7 @@ apply { plugin("kotlin") }
dependencies {
compile(protobufFull())
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":j2k"))
compile(project(":compiler:util"))
compile(project(":compiler:cli"))
+1 -1
View File
@@ -118,7 +118,7 @@ sourceSets {
projectTest {
dependsOnTaskIfExistsRec("dist", project = rootProject)
workingDir = rootDir
afterEvaluate {
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
+4 -2
View File
@@ -5,6 +5,9 @@ apply { plugin("kotlin") }
val androidSdk by configurations.creating
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compileOnly(project(":kotlin-reflect-api"))
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
@@ -45,8 +48,6 @@ dependencies {
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("copyright"))
testRuntime(intellijPluginDep("coverage"))
@@ -72,6 +73,7 @@ projectTest {
workingDir = rootDir
doFirst {
systemProperty("android.sdk", androidSdk.singleFile.canonicalPath)
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
+2
View File
@@ -3,6 +3,7 @@ apply { plugin("kotlin") }
val androidSdk by configurations.creating
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compileOnly(project(":idea"))
@@ -64,6 +65,7 @@ projectTest {
dependsOn(androidSdk)
doFirst {
systemProperty("android.sdk", androidSdk.singleFile.canonicalPath)
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
+3
View File
@@ -55,4 +55,7 @@ testsJar()
projectTest {
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
+4
View File
@@ -18,6 +18,7 @@ val usedIntellijPlugins = arrayOf(
"java-decompiler")
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
compile(projectDist(":kotlin-stdlib"))
@@ -53,6 +54,9 @@ sourceSets {
projectTest {
dependsOnTaskIfExistsRec("dist", project = rootProject)
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
testsJar()
+1
View File
@@ -15,6 +15,7 @@ apply { plugin("kotlin") }
val antLauncherJar by configurations.creating
dependencies {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testCompile(protobufFull())
@@ -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)
}
}
+59 -49
View File
@@ -12,9 +12,16 @@ val ideaProjectResources = project(":idea").the<JavaPluginConvention>().sourceS
evaluationDependsOn(":prepare:idea-plugin")
val intellijUltimateEnabled = true // : Boolean by rootProject.extra
val springClasspath by configurations.creating
dependencies {
if (intellijUltimateEnabled) {
testRuntime(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijUltimateDep())
}
compileOnly(project(":kotlin-reflect-api"))
compile(projectDist(":kotlin-stdlib"))
compile(project(":core:descriptors")) { isTransitive = false }
@@ -30,31 +37,37 @@ dependencies {
compile(project(":idea:ide-common")) { isTransitive = false }
compile(project(":idea:idea-gradle")) { isTransitive = false }
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("annotations", "trove4j", "openapi", "idea", "util", "jdom") }
compileOnly(intellijPluginDep("CSS"))
compileOnly(intellijPluginDep("DatabaseTools"))
compileOnly(intellijPluginDep("JavaEE"))
compileOnly(intellijPluginDep("jsp"))
compileOnly(intellijPluginDep("PersistenceSupport"))
compileOnly(intellijPluginDep("Spring"))
compileOnly(intellijPluginDep("properties"))
compileOnly(intellijPluginDep("java-i18n"))
compileOnly(intellijPluginDep("gradle"))
compileOnly(intellijPluginDep("Groovy"))
compileOnly(intellijPluginDep("junit"))
compileOnly(intellijPluginDep("uml"))
compileOnly(intellijPluginDep("JavaScriptLanguage"))
compileOnly(intellijPluginDep("JavaScriptDebugger"))
compileOnly(intellijPluginDep("NodeJS"))
if (intellijUltimateEnabled) {
compileOnly(intellijUltimatePluginDep("NodeJS"))
compileOnly(intellijUltimateDep()) { includeJars("annotations", "trove4j", "openapi", "idea", "util", "jdom") }
compileOnly(intellijUltimatePluginDep("CSS"))
compileOnly(intellijUltimatePluginDep("DatabaseTools"))
compileOnly(intellijUltimatePluginDep("JavaEE"))
compileOnly(intellijUltimatePluginDep("jsp"))
compileOnly(intellijUltimatePluginDep("PersistenceSupport"))
compileOnly(intellijUltimatePluginDep("Spring"))
compileOnly(intellijUltimatePluginDep("properties"))
compileOnly(intellijUltimatePluginDep("java-i18n"))
compileOnly(intellijUltimatePluginDep("gradle"))
compileOnly(intellijUltimatePluginDep("Groovy"))
compileOnly(intellijUltimatePluginDep("junit"))
compileOnly(intellijUltimatePluginDep("uml"))
compileOnly(intellijUltimatePluginDep("JavaScriptLanguage"))
compileOnly(intellijUltimatePluginDep("JavaScriptDebugger"))
}
testCompile(projectDist(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":idea:idea-test-framework")) { isTransitive = false }
testCompileOnly(project(":plugins:lint")) { isTransitive = false }
testCompileOnly(project(":idea:idea-jvm")) { isTransitive = false }
testCompile(project(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:lint")) { isTransitive = false }
testCompile(project(":idea:idea-jvm")) { isTransitive = false }
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea")) { isTransitive = false }
testCompile(projectTests(":generators:test-generator"))
testCompile(commonDep("junit:junit"))
if (intellijUltimateEnabled) {
testCompileOnly(intellijUltimateDep()) { includeJars("gson-2.5", "annotations", "trove4j", "openapi", "idea", "util", "jdom") }
}
testCompile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
testRuntime(projectDist(":kotlin-reflect"))
@@ -76,42 +89,39 @@ dependencies {
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
testRuntime(project(":plugins:uast-kotlin"))
testRuntime(project(":plugins:uast-kotlin-idea"))
if (intellijUltimateEnabled) {
testCompile(intellijUltimatePluginDep("CSS"))
testCompile(intellijUltimatePluginDep("DatabaseTools"))
testCompile(intellijUltimatePluginDep("JavaEE"))
testCompile(intellijUltimatePluginDep("jsp"))
testCompile(intellijUltimatePluginDep("PersistenceSupport"))
testCompile(intellijUltimatePluginDep("Spring"))
testCompile(intellijUltimatePluginDep("uml"))
testCompile(intellijUltimatePluginDep("JavaScriptLanguage"))
testCompile(intellijUltimatePluginDep("JavaScriptDebugger"))
testCompile(intellijUltimatePluginDep("NodeJS"))
testCompile(intellijUltimatePluginDep("properties"))
testCompile(intellijUltimatePluginDep("java-i18n"))
testCompile(intellijUltimatePluginDep("gradle"))
testCompile(intellijUltimatePluginDep("Groovy"))
testCompile(intellijUltimatePluginDep("junit"))
testRuntime(intellijUltimatePluginDep("coverage"))
testRuntime(intellijUltimatePluginDep("maven"))
testRuntime(intellijUltimatePluginDep("android"))
testRuntime(intellijUltimatePluginDep("testng"))
testRuntime(intellijUltimatePluginDep("IntelliLang"))
testRuntime(intellijUltimatePluginDep("copyright"))
testRuntime(intellijUltimatePluginDep("java-decompiler"))
}
testRuntime(files("${System.getProperty("java.home")}/../lib/tools.jar"))
testRuntime(project(":plugins:kapt3-idea"))
testRuntime(project(":idea:idea-test-framework"))
testRuntime(project(":plugins:lint"))
testRuntime(project(":idea:idea-jvm"))
springClasspath(commonDep("org.springframework", "spring-core"))
springClasspath(commonDep("org.springframework", "spring-beans"))
springClasspath(commonDep("org.springframework", "spring-context"))
springClasspath(commonDep("org.springframework", "spring-tx"))
springClasspath(commonDep("org.springframework", "spring-web"))
testCompileOnly(intellijDep()) { includeJars("gson-2.5", "annotations", "trove4j", "openapi", "idea", "util", "jdom") }
testRuntime(intellijDep())
testCompile(intellijPluginDep("CSS"))
testCompile(intellijPluginDep("DatabaseTools"))
testCompile(intellijPluginDep("JavaEE"))
testCompile(intellijPluginDep("jsp"))
testCompile(intellijPluginDep("PersistenceSupport"))
testCompile(intellijPluginDep("Spring"))
testCompile(intellijPluginDep("properties"))
testCompile(intellijPluginDep("java-i18n"))
testCompile(intellijPluginDep("gradle"))
testCompile(intellijPluginDep("Groovy"))
testCompile(intellijPluginDep("junit"))
testCompile(intellijPluginDep("uml"))
testCompile(intellijPluginDep("JavaScriptLanguage"))
testCompile(intellijPluginDep("JavaScriptDebugger"))
testCompile(intellijPluginDep("NodeJS"))
testRuntime(intellijPluginDep("coverage"))
testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("testng"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("copyright"))
testRuntime(intellijPluginDep("java-decompiler"))
}
val preparedResources = File(buildDir, "prepResources")
@@ -187,7 +197,7 @@ projectTest {
dependsOn(preparePluginXml)
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
systemProperty("idea.home.path", intellijUltimateRootDir().canonicalPath)
systemProperty("spring.classpath", springClasspath.asPath)
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ afterEvaluate {
dependsOn(prepareSandbox)
group = "intellij"
description = "Runs Intellij IDEA Ultimate with installed plugin."
setIdeaDirectory(intellijRootDir())
setIdeaDirectory(intellijUltimateRootDir())
setConfigDirectory(File(ideaUltimateSandboxDir, "config"))
setSystemDirectory(ideaUltimateSandboxDir)
setPluginsDirectory(ideaUltimatePluginDir.parent)