JPS Build: support building and running IDEA Ultimate
This commit is contained in:
+42
-18
@@ -7,6 +7,10 @@ val ideaSandboxDir: File by extra
|
|||||||
val ideaSdkPath: String
|
val ideaSdkPath: String
|
||||||
get() = IntellijRootUtils.getIntellijRootDir(rootProject).absolutePath
|
get() = IntellijRootUtils.getIntellijRootDir(rootProject).absolutePath
|
||||||
|
|
||||||
|
val intellijUltimateEnabled : Boolean by rootProject.extra
|
||||||
|
val ideaUltimatePluginDir: File by rootProject.extra
|
||||||
|
val ideaUltimateSandboxDir: File by rootProject.extra
|
||||||
|
|
||||||
fun org.jetbrains.gradle.ext.JUnit.configureForKotlin() {
|
fun org.jetbrains.gradle.ext.JUnit.configureForKotlin() {
|
||||||
vmParameters = listOf(
|
vmParameters = listOf(
|
||||||
"-ea",
|
"-ea",
|
||||||
@@ -61,24 +65,36 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
runConfigurations {
|
runConfigurations {
|
||||||
application("[JPS] IDEA") {
|
fun idea(
|
||||||
moduleName = "kotlin.idea-runner.main"
|
title: String,
|
||||||
workingDirectory = File(intellijRootDir(), "bin").toString()
|
sandboxDir: File,
|
||||||
mainClass = "com.intellij.idea.Main"
|
pluginDir: File
|
||||||
jvmArgs = listOf(
|
) {
|
||||||
"-Xmx1250m",
|
application(title) {
|
||||||
"-XX:ReservedCodeCacheSize=240m",
|
moduleName = "kotlin.idea-runner.main"
|
||||||
"-XX:+HeapDumpOnOutOfMemoryError",
|
workingDirectory = File(intellijRootDir(), "bin").toString()
|
||||||
"-ea",
|
mainClass = "com.intellij.idea.Main"
|
||||||
"-Didea.is.internal=true",
|
jvmArgs = listOf(
|
||||||
"-Didea.debug.mode=true",
|
"-Xmx1250m",
|
||||||
"-Didea.system.path=${ideaSandboxDir.absolutePath}",
|
"-XX:ReservedCodeCacheSize=240m",
|
||||||
"-Didea.config.path=${ideaSandboxDir.absolutePath}/config",
|
"-XX:+HeapDumpOnOutOfMemoryError",
|
||||||
"-Dapple.laf.useScreenMenuBar=true",
|
"-ea",
|
||||||
"-Dapple.awt.graphics.UseQuartz=true",
|
"-Didea.is.internal=true",
|
||||||
"-Dsun.io.useCanonCaches=false",
|
"-Didea.debug.mode=true",
|
||||||
"-Dplugin.path=${ideaPluginDir.absolutePath}"
|
"-Didea.system.path=${sandboxDir.absolutePath}",
|
||||||
).joinToString(" ")
|
"-Didea.config.path=${sandboxDir.absolutePath}/config",
|
||||||
|
"-Dapple.laf.useScreenMenuBar=true",
|
||||||
|
"-Dapple.awt.graphics.UseQuartz=true",
|
||||||
|
"-Dsun.io.useCanonCaches=false",
|
||||||
|
"-Dplugin.path=${pluginDir.absolutePath}"
|
||||||
|
).joinToString(" ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
idea("[JPS] IDEA", ideaSandboxDir, ideaPluginDir)
|
||||||
|
|
||||||
|
if (intellijUltimateEnabled) {
|
||||||
|
idea("[JPS] IDEA Ultimate", ideaUltimateSandboxDir, ideaPluginDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
application("[JPS] Generate All Tests") {
|
application("[JPS] Generate All Tests") {
|
||||||
@@ -98,6 +114,14 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|||||||
configureForKotlin()
|
configureForKotlin()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (intellijUltimateEnabled) {
|
||||||
|
junit("[JPS] All IDEA Ultimate Plugin Tests") {
|
||||||
|
moduleName = "kotlin.ultimate.test"
|
||||||
|
pattern = "org.jetbrains.kotlin.*"
|
||||||
|
configureForKotlin()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
junit("[JPS] Compiler Tests") {
|
junit("[JPS] Compiler Tests") {
|
||||||
moduleName = "kotlin.compiler.test"
|
moduleName = "kotlin.compiler.test"
|
||||||
pattern = "org.jetbrains.kotlin.*"
|
pattern = "org.jetbrains.kotlin.*"
|
||||||
|
|||||||
Reference in New Issue
Block a user