Apply rri/yole/modularize, create gradle run configuration for IDEA
This commit is contained in:
committed by
Ilya Chernikov
parent
7cb8a90513
commit
360a692af8
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="gsk [runIde]" type="GradleRunConfiguration" factoryName="Gradle" singleton="true">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="runIde" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" value="" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
@@ -231,6 +231,7 @@ val compilerCopyTask = task<Copy>("idea-plugin-copy-compiler") {
|
|||||||
task<Copy>("dist-plugin") {
|
task<Copy>("dist-plugin") {
|
||||||
dependsOn(compilerCopyTask)
|
dependsOn(compilerCopyTask)
|
||||||
dependsOnTaskIfExistsRec("idea-plugin")
|
dependsOnTaskIfExistsRec("idea-plugin")
|
||||||
|
shouldRunAfter(":prepare:kotlin-plugin:idea-plugin")
|
||||||
into("$ideaPluginDir/lib")
|
into("$ideaPluginDir/lib")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,6 +263,8 @@ tasks {
|
|||||||
"idea-plugin-tests" {
|
"idea-plugin-tests" {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":idea:test",
|
dependsOn(":idea:test",
|
||||||
|
":idea:idea-gradle:test",
|
||||||
|
":idea:idea-maven:test",
|
||||||
":j2k:test",
|
":j2k:test",
|
||||||
":eval4j:test")
|
":eval4j:test")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,3 +81,11 @@ private fun String.toMaybeVersionedJarRegex(): Regex {
|
|||||||
return Regex(if (hasJarExtension) escaped else "$escaped(-\\d.*)?\\.jar") // TODO: consider more precise version part of the regex
|
return Regex(if (hasJarExtension) escaped else "$escaped(-\\d.*)?\\.jar") // TODO: consider more precise version part of the regex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private val jreHome = System.getProperty("java.home")
|
||||||
|
|
||||||
|
fun firstFromJavaHomeThatExists(vararg paths: String): File =
|
||||||
|
paths.mapNotNull { File(jreHome, it).takeIf { it.exists() } }.firstOrNull()
|
||||||
|
?: throw GradleException("Cannot find under '$jreHome' neither of: ${paths.joinToString()}")
|
||||||
|
|
||||||
|
fun toolsJar(): File = firstFromJavaHomeThatExists("../lib/tools.jar", "../Classes/tools.jar")
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ dependencies {
|
|||||||
compile(projectTests(":compiler:container"))
|
compile(projectTests(":compiler:container"))
|
||||||
compile(projectTests(":compiler:incremental-compilation-impl"))
|
compile(projectTests(":compiler:incremental-compilation-impl"))
|
||||||
compile(projectTests(":idea"))
|
compile(projectTests(":idea"))
|
||||||
|
compile(projectTests(":idea:idea-gradle"))
|
||||||
|
compile(projectTests(":idea:idea-maven"))
|
||||||
compile(projectTests(":j2k"))
|
compile(projectTests(":j2k"))
|
||||||
compile(projectTests(":idea:idea-android"))
|
compile(projectTests(":idea:idea-android"))
|
||||||
compile(projectTests(":jps-plugin"))
|
compile(projectTests(":jps-plugin"))
|
||||||
|
|||||||
@@ -339,6 +339,41 @@
|
|||||||
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
":idea-runner": {
|
||||||
|
"conventions": {
|
||||||
|
"base": "org.gradle.api.plugins.BasePluginConvention",
|
||||||
|
"java": "org.gradle.api.plugins.JavaPluginConvention"
|
||||||
|
},
|
||||||
|
"configurations": [
|
||||||
|
"apiElements",
|
||||||
|
"archives",
|
||||||
|
"compile",
|
||||||
|
"compileClasspath",
|
||||||
|
"compileOnly",
|
||||||
|
"default",
|
||||||
|
"implementation",
|
||||||
|
"kapt",
|
||||||
|
"kaptTest",
|
||||||
|
"runtime",
|
||||||
|
"runtimeClasspath",
|
||||||
|
"runtimeElements",
|
||||||
|
"runtimeOnly",
|
||||||
|
"testCompile",
|
||||||
|
"testCompileClasspath",
|
||||||
|
"testCompileOnly",
|
||||||
|
"testImplementation",
|
||||||
|
"testRuntime",
|
||||||
|
"testRuntimeClasspath",
|
||||||
|
"testRuntimeOnly"
|
||||||
|
],
|
||||||
|
"extensions": {
|
||||||
|
"ext": "org.gradle.api.plugins.ExtraPropertiesExtension",
|
||||||
|
"kotlin": "org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension",
|
||||||
|
"kapt": "org.jetbrains.kotlin.gradle.plugin.KaptExtension",
|
||||||
|
"defaultArtifacts": "org.gradle.api.internal.plugins.DefaultArtifactPublicationSet",
|
||||||
|
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
||||||
|
}
|
||||||
|
},
|
||||||
":j2k": {
|
":j2k": {
|
||||||
"conventions": {
|
"conventions": {
|
||||||
"base": "org.gradle.api.plugins.BasePluginConvention",
|
"base": "org.gradle.api.plugins.BasePluginConvention",
|
||||||
@@ -2854,6 +2889,41 @@
|
|||||||
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
":idea:idea-gradle": {
|
||||||
|
"conventions": {
|
||||||
|
"base": "org.gradle.api.plugins.BasePluginConvention",
|
||||||
|
"java": "org.gradle.api.plugins.JavaPluginConvention"
|
||||||
|
},
|
||||||
|
"configurations": [
|
||||||
|
"apiElements",
|
||||||
|
"archives",
|
||||||
|
"compile",
|
||||||
|
"compileClasspath",
|
||||||
|
"compileOnly",
|
||||||
|
"default",
|
||||||
|
"implementation",
|
||||||
|
"kapt",
|
||||||
|
"kaptTest",
|
||||||
|
"runtime",
|
||||||
|
"runtimeClasspath",
|
||||||
|
"runtimeElements",
|
||||||
|
"runtimeOnly",
|
||||||
|
"testCompile",
|
||||||
|
"testCompileClasspath",
|
||||||
|
"testCompileOnly",
|
||||||
|
"testImplementation",
|
||||||
|
"testRuntime",
|
||||||
|
"testRuntimeClasspath",
|
||||||
|
"testRuntimeOnly"
|
||||||
|
],
|
||||||
|
"extensions": {
|
||||||
|
"ext": "org.gradle.api.plugins.ExtraPropertiesExtension",
|
||||||
|
"kotlin": "org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension",
|
||||||
|
"kapt": "org.jetbrains.kotlin.gradle.plugin.KaptExtension",
|
||||||
|
"defaultArtifacts": "org.gradle.api.internal.plugins.DefaultArtifactPublicationSet",
|
||||||
|
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
||||||
|
}
|
||||||
|
},
|
||||||
":idea:idea-jps-common": {
|
":idea:idea-jps-common": {
|
||||||
"conventions": {
|
"conventions": {
|
||||||
"base": "org.gradle.api.plugins.BasePluginConvention",
|
"base": "org.gradle.api.plugins.BasePluginConvention",
|
||||||
@@ -2889,6 +2959,76 @@
|
|||||||
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
":idea:idea-jvm": {
|
||||||
|
"conventions": {
|
||||||
|
"base": "org.gradle.api.plugins.BasePluginConvention",
|
||||||
|
"java": "org.gradle.api.plugins.JavaPluginConvention"
|
||||||
|
},
|
||||||
|
"configurations": [
|
||||||
|
"apiElements",
|
||||||
|
"archives",
|
||||||
|
"compile",
|
||||||
|
"compileClasspath",
|
||||||
|
"compileOnly",
|
||||||
|
"default",
|
||||||
|
"implementation",
|
||||||
|
"kapt",
|
||||||
|
"kaptTest",
|
||||||
|
"runtime",
|
||||||
|
"runtimeClasspath",
|
||||||
|
"runtimeElements",
|
||||||
|
"runtimeOnly",
|
||||||
|
"testCompile",
|
||||||
|
"testCompileClasspath",
|
||||||
|
"testCompileOnly",
|
||||||
|
"testImplementation",
|
||||||
|
"testRuntime",
|
||||||
|
"testRuntimeClasspath",
|
||||||
|
"testRuntimeOnly"
|
||||||
|
],
|
||||||
|
"extensions": {
|
||||||
|
"ext": "org.gradle.api.plugins.ExtraPropertiesExtension",
|
||||||
|
"kotlin": "org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension",
|
||||||
|
"kapt": "org.jetbrains.kotlin.gradle.plugin.KaptExtension",
|
||||||
|
"defaultArtifacts": "org.gradle.api.internal.plugins.DefaultArtifactPublicationSet",
|
||||||
|
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
":idea:idea-maven": {
|
||||||
|
"conventions": {
|
||||||
|
"base": "org.gradle.api.plugins.BasePluginConvention",
|
||||||
|
"java": "org.gradle.api.plugins.JavaPluginConvention"
|
||||||
|
},
|
||||||
|
"configurations": [
|
||||||
|
"apiElements",
|
||||||
|
"archives",
|
||||||
|
"compile",
|
||||||
|
"compileClasspath",
|
||||||
|
"compileOnly",
|
||||||
|
"default",
|
||||||
|
"implementation",
|
||||||
|
"kapt",
|
||||||
|
"kaptTest",
|
||||||
|
"runtime",
|
||||||
|
"runtimeClasspath",
|
||||||
|
"runtimeElements",
|
||||||
|
"runtimeOnly",
|
||||||
|
"testCompile",
|
||||||
|
"testCompileClasspath",
|
||||||
|
"testCompileOnly",
|
||||||
|
"testImplementation",
|
||||||
|
"testRuntime",
|
||||||
|
"testRuntimeClasspath",
|
||||||
|
"testRuntimeOnly"
|
||||||
|
],
|
||||||
|
"extensions": {
|
||||||
|
"ext": "org.gradle.api.plugins.ExtraPropertiesExtension",
|
||||||
|
"kotlin": "org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension",
|
||||||
|
"kapt": "org.jetbrains.kotlin.gradle.plugin.KaptExtension",
|
||||||
|
"defaultArtifacts": "org.gradle.api.internal.plugins.DefaultArtifactPublicationSet",
|
||||||
|
"reporting": "org.gradle.api.reporting.ReportingExtension"
|
||||||
|
}
|
||||||
|
},
|
||||||
":idea:idea-test-framework": {
|
":idea:idea-test-framework": {
|
||||||
"conventions": {
|
"conventions": {
|
||||||
"base": "org.gradle.api.plugins.BasePluginConvention",
|
"base": "org.gradle.api.plugins.BasePluginConvention",
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
apply { plugin("kotlin") }
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
compile(ideaSdkDeps("*.jar"))
|
||||||
|
compileOnly(project(":idea"))
|
||||||
|
compileOnly(project(":idea:idea-maven"))
|
||||||
|
compileOnly(project(":idea:idea-gradle"))
|
||||||
|
compileOnly(project(":idea:idea-jvm"))
|
||||||
|
|
||||||
|
runtimeOnly(files(toolsJar()))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
val runIde by task<JavaExec> {
|
||||||
|
dependsOn(":dist", ":prepare:kotlin-plugin:idea-plugin", ":dist-plugin")
|
||||||
|
|
||||||
|
classpath = the<JavaPluginConvention>().sourceSets["main"].runtimeClasspath
|
||||||
|
|
||||||
|
main = "com.intellij.idea.Main"
|
||||||
|
|
||||||
|
workingDir = File(rootDir, "ideaSDK", "bin")
|
||||||
|
|
||||||
|
val pluginPath = File(rootDir, "dist", "artifacts", "Kotlin")
|
||||||
|
|
||||||
|
jvmArgs(
|
||||||
|
"-Xmx1250m",
|
||||||
|
"-XX:ReservedCodeCacheSize=240m",
|
||||||
|
"-XX:+HeapDumpOnOutOfMemoryError",
|
||||||
|
"-ea",
|
||||||
|
"-Didea.is.internal=true",
|
||||||
|
"-Didea.debug.mode=true",
|
||||||
|
"-Didea.system.path=../system-idea",
|
||||||
|
"-Didea.config.path=../config-idea",
|
||||||
|
"-Dapple.laf.useScreenMenuBar=true",
|
||||||
|
"-Dapple.awt.graphics.UseQuartz=true",
|
||||||
|
"-Dsun.io.useCanonCaches=false",
|
||||||
|
"-Dplugin.path=${pluginPath.absolutePath}",
|
||||||
|
"-Dkotlin.internal.mode.enabled=true",
|
||||||
|
"-Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar"
|
||||||
|
)
|
||||||
|
args()
|
||||||
|
}
|
||||||
+8
-14
@@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
import org.gradle.jvm.tasks.Jar
|
||||||
|
|
||||||
apply { plugin("kotlin") }
|
apply { plugin("kotlin") }
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -30,18 +32,10 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly(ideaSdkDeps("openapi", "idea", "velocity", "boot", "gson", "swingx-core", "jsr305", "forms_rt"))
|
compileOnly(ideaSdkDeps("openapi", "idea", "velocity", "boot", "gson", "swingx-core", "jsr305", "forms_rt"))
|
||||||
|
|
||||||
compile(ideaPluginDeps("idea-junit", plugin = "junit"))
|
|
||||||
compile(ideaPluginDeps("IntelliLang", plugin = "IntelliLang"))
|
compile(ideaPluginDeps("IntelliLang", plugin = "IntelliLang"))
|
||||||
compile(ideaPluginDeps("testng", "testng-plugin", plugin = "testng"))
|
|
||||||
compile(ideaPluginDeps("copyright", plugin = "copyright"))
|
compile(ideaPluginDeps("copyright", plugin = "copyright"))
|
||||||
compile(ideaPluginDeps("properties", plugin = "properties"))
|
compile(ideaPluginDeps("properties", plugin = "properties"))
|
||||||
compile(ideaPluginDeps("java-i18n", plugin = "java-i18n"))
|
compile(ideaPluginDeps("java-i18n", plugin = "java-i18n"))
|
||||||
compile(ideaPluginDeps("coverage", plugin = "coverage"))
|
|
||||||
compile(ideaPluginDeps("java-decompiler", plugin = "java-decompiler"))
|
|
||||||
|
|
||||||
compileOnly(ideaPluginDeps("gradle-tooling-api", "gradle", plugin = "gradle"))
|
|
||||||
compileOnly(ideaPluginDeps("Groovy", plugin = "Groovy"))
|
|
||||||
compileOnly(ideaPluginDeps("maven", "maven-server-api", plugin = "maven"))
|
|
||||||
|
|
||||||
compile(preloadedDeps("markdown", "kotlinx-coroutines-core"))
|
compile(preloadedDeps("markdown", "kotlinx-coroutines-core"))
|
||||||
|
|
||||||
@@ -49,6 +43,9 @@ dependencies {
|
|||||||
testCompile(project(":compiler:cli"))
|
testCompile(project(":compiler:cli"))
|
||||||
testCompile(project(":compiler.tests-common"))
|
testCompile(project(":compiler.tests-common"))
|
||||||
testCompile(project(":idea:idea-test-framework")) { isTransitive = false }
|
testCompile(project(":idea:idea-test-framework")) { isTransitive = false }
|
||||||
|
testCompile(project(":idea:idea-jvm")) { isTransitive = false }
|
||||||
|
testCompile(project(":idea:idea-gradle")) { isTransitive = false }
|
||||||
|
testCompile(project(":idea:idea-maven")) { isTransitive = false }
|
||||||
testCompile(commonDep("junit:junit"))
|
testCompile(commonDep("junit:junit"))
|
||||||
|
|
||||||
testCompileOnly(ideaPluginDeps("gradle-base-services", "gradle-tooling-extension-impl", "gradle-wrapper", plugin = "gradle"))
|
testCompileOnly(ideaPluginDeps("gradle-base-services", "gradle-tooling-extension-impl", "gradle-wrapper", plugin = "gradle"))
|
||||||
@@ -59,7 +56,7 @@ dependencies {
|
|||||||
|
|
||||||
testRuntime(ideaSdkDeps("*.jar"))
|
testRuntime(ideaSdkDeps("*.jar"))
|
||||||
|
|
||||||
testRuntime(ideaPluginDeps("resources_en", plugin = "junit"))
|
testRuntime(ideaPluginDeps("*.jar", plugin = "junit"))
|
||||||
testRuntime(ideaPluginDeps("jcommander", "resources_en", plugin = "testng"))
|
testRuntime(ideaPluginDeps("jcommander", "resources_en", plugin = "testng"))
|
||||||
testRuntime(ideaPluginDeps("resources_en", plugin = "properties"))
|
testRuntime(ideaPluginDeps("resources_en", plugin = "properties"))
|
||||||
testRuntime(ideaPluginDeps("*.jar", plugin = "gradle"))
|
testRuntime(ideaPluginDeps("*.jar", plugin = "gradle"))
|
||||||
@@ -90,16 +87,13 @@ dependencies {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
"main" {
|
"main" {
|
||||||
projectDefault()
|
projectDefault()
|
||||||
java.srcDirs("idea-maven/src",
|
java.srcDirs("idea-completion/src",
|
||||||
"idea-gradle/src",
|
|
||||||
"idea-completion/src",
|
|
||||||
"idea-live-templates/src",
|
"idea-live-templates/src",
|
||||||
"idea-repl/src")
|
"idea-repl/src")
|
||||||
resources.srcDir("idea-maven/resources")
|
|
||||||
}
|
}
|
||||||
"test" {
|
"test" {
|
||||||
projectDefault()
|
projectDefault()
|
||||||
java.srcDirs("idea-maven/test",
|
java.srcDirs(
|
||||||
"idea-completion/tests",
|
"idea-completion/tests",
|
||||||
"idea-live-templates/tests")
|
"idea-live-templates/tests")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ dependencies {
|
|||||||
compile(project(":idea"))
|
compile(project(":idea"))
|
||||||
compile(project(":idea:idea-core"))
|
compile(project(":idea:idea-core"))
|
||||||
compile(project(":idea:ide-common"))
|
compile(project(":idea:ide-common"))
|
||||||
|
compile(project(":idea:idea-gradle"))
|
||||||
|
|
||||||
compile(ideaSdkDeps("openapi", "idea"))
|
compile(ideaSdkDeps("openapi", "idea"))
|
||||||
compile(ideaPluginDeps("gradle-tooling-api", plugin = "gradle"))
|
compile(ideaPluginDeps("gradle-tooling-api", plugin = "gradle"))
|
||||||
compile(ideaPluginDeps("android", "android-common", "sdklib", "sdk-common", "layoutlib-api", plugin = "android"))
|
compile(ideaPluginDeps("android", "android-common", "sdklib", "sdk-common", "layoutlib-api", plugin = "android"))
|
||||||
@@ -20,6 +22,7 @@ dependencies {
|
|||||||
testCompile(project(":idea:idea-test-framework")) { isTransitive = false }
|
testCompile(project(":idea:idea-test-framework")) { isTransitive = false }
|
||||||
testCompile(project(":plugins:lint")) { isTransitive = false }
|
testCompile(project(":plugins:lint")) { isTransitive = false }
|
||||||
testCompile(projectTests(":idea"))
|
testCompile(projectTests(":idea"))
|
||||||
|
testCompile(projectTests(":idea:idea-gradle"))
|
||||||
testCompile(ideaPluginDeps("properties", plugin = "properties"))
|
testCompile(ideaPluginDeps("properties", plugin = "properties"))
|
||||||
testCompile(ideaSdkDeps("gson"))
|
testCompile(ideaSdkDeps("gson"))
|
||||||
testCompile(commonDep("junit:junit"))
|
testCompile(commonDep("junit:junit"))
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
apply { plugin("kotlin") }
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
compileOnly(ideaSdkDeps("openapi", "idea"))
|
||||||
|
compileOnly(ideaPluginDeps("gradle-tooling-api", "gradle", plugin = "gradle"))
|
||||||
|
compileOnly(ideaPluginDeps("Groovy", plugin = "Groovy"))
|
||||||
|
|
||||||
|
compileOnly(project(":idea"))
|
||||||
|
compileOnly(project(":idea:idea-jvm"))
|
||||||
|
compile(project(":idea:kotlin-gradle-tooling"))
|
||||||
|
|
||||||
|
compile(project(":compiler:frontend"))
|
||||||
|
compile(project(":compiler:frontend.java"))
|
||||||
|
compile(project(":compiler:frontend.script"))
|
||||||
|
|
||||||
|
compile(project(":js:js.frontend"))
|
||||||
|
|
||||||
|
testCompile(projectTests(":idea"))
|
||||||
|
testCompile(project(":idea:idea-test-framework"))
|
||||||
|
testCompile(ideaSdkDeps("openapi", "idea", "groovy-all"))
|
||||||
|
testCompile(ideaPluginDeps("gradle-wrapper", "gradle-base-services", "gradle-tooling-extension-impl", "gradle-tooling-api", "gradle", plugin = "gradle"))
|
||||||
|
testCompile(ideaPluginDeps("Groovy", plugin = "Groovy"))
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
"main" { projectDefault() }
|
||||||
|
"test" { projectDefault() }
|
||||||
|
}
|
||||||
|
|
||||||
|
testsJar()
|
||||||
|
|
||||||
|
projectTest {
|
||||||
|
workingDir = rootDir
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
apply { plugin("kotlin") }
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile(project(":idea"))
|
||||||
|
compile(project(":compiler:light-classes"))
|
||||||
|
compile(project(":compiler:frontend.java"))
|
||||||
|
|
||||||
|
compileOnly(ideaSdkDeps("openapi", "idea"))
|
||||||
|
|
||||||
|
compile(ideaPluginDeps("idea-junit", plugin = "junit"))
|
||||||
|
compile(ideaPluginDeps("testng", "testng-plugin", plugin = "testng"))
|
||||||
|
|
||||||
|
compile(ideaPluginDeps("coverage", plugin = "coverage"))
|
||||||
|
|
||||||
|
compile(ideaPluginDeps("java-decompiler", plugin = "java-decompiler"))
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
"main" { projectDefault() }
|
||||||
|
"test" { none() }
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
apply { plugin("kotlin") }
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly(ideaSdkDeps("openapi", "idea", "gson"))
|
||||||
|
compileOnly(ideaPluginDeps("maven", "maven-server-api", plugin = "maven"))
|
||||||
|
|
||||||
|
compile(project(":core:util.runtime"))
|
||||||
|
compile(project(":compiler:frontend"))
|
||||||
|
compile(project(":compiler:frontend.java"))
|
||||||
|
compile(project(":compiler:util"))
|
||||||
|
compile(project(":compiler:cli-common"))
|
||||||
|
compile(project(":kotlin-build-common"))
|
||||||
|
|
||||||
|
compile(project(":js:js.frontend"))
|
||||||
|
|
||||||
|
compile(project(":idea"))
|
||||||
|
compile(project(":idea:idea-jps-common"))
|
||||||
|
|
||||||
|
testCompile(projectTests(":idea"))
|
||||||
|
testCompile(project(":compiler.tests-common"))
|
||||||
|
testCompile(project(":idea:idea-test-framework"))
|
||||||
|
testCompileOnly(ideaSdkDeps("openapi", "idea", "gson"))
|
||||||
|
testCompileOnly(ideaPluginDeps("maven", "maven-server-api", plugin = "maven"))
|
||||||
|
|
||||||
|
testRuntime(ideaSdkDeps("*.jar"))
|
||||||
|
testRuntime(ideaPluginDeps("resources_en", plugin = "junit"))
|
||||||
|
testRuntime(ideaPluginDeps("jcommander", "resources_en", plugin = "testng"))
|
||||||
|
testRuntime(ideaPluginDeps("resources_en", plugin = "properties"))
|
||||||
|
testRuntime(ideaPluginDeps("*.jar", plugin = "gradle"))
|
||||||
|
testRuntime(ideaPluginDeps("*.jar", plugin = "Groovy"))
|
||||||
|
testRuntime(ideaPluginDeps("jacocoant", plugin = "coverage"))
|
||||||
|
testRuntime(ideaPluginDeps("*.jar", plugin = "maven"))
|
||||||
|
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
"main" { projectDefault() }
|
||||||
|
"test" { projectDefault() }
|
||||||
|
}
|
||||||
|
|
||||||
|
testsJar()
|
||||||
|
|
||||||
|
projectTest {
|
||||||
|
workingDir = rootDir
|
||||||
|
}
|
||||||
@@ -59,10 +59,13 @@ val testForWebDemo by task<Test> {
|
|||||||
classpath = the<JavaPluginConvention>().sourceSets["test"].runtimeClasspath
|
classpath = the<JavaPluginConvention>().sourceSets["test"].runtimeClasspath
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
|
val cleanTestForWebDemo by tasks
|
||||||
|
|
||||||
val test: Test by tasks
|
val test: Test by tasks
|
||||||
test.apply {
|
test.apply {
|
||||||
exclude("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
exclude("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
||||||
dependsOn(testForWebDemo)
|
dependsOn(testForWebDemo)
|
||||||
}
|
}
|
||||||
|
val cleanTest by tasks
|
||||||
|
cleanTest.dependsOn(cleanTestForWebDemo)
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ dependencies {
|
|||||||
compile(project(":compiler:light-classes"))
|
compile(project(":compiler:light-classes"))
|
||||||
compile(project(":idea:idea-core"))
|
compile(project(":idea:idea-core"))
|
||||||
compile(project(":idea"))
|
compile(project(":idea"))
|
||||||
|
compile(project(":idea:idea-gradle"))
|
||||||
compile(project(":android-extensions-compiler"))
|
compile(project(":android-extensions-compiler"))
|
||||||
compile(ideaPluginDeps("android", "sdk-tools", "sdk-common", plugin = "android"))
|
compile(ideaPluginDeps("android", "sdk-tools", "sdk-common", plugin = "android"))
|
||||||
compile(ideaPluginDeps("Groovy", plugin = "Groovy"))
|
compile(ideaPluginDeps("Groovy", plugin = "Groovy"))
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ dependencies {
|
|||||||
compile(project(":compiler:cli-common"))
|
compile(project(":compiler:cli-common"))
|
||||||
compile(project(":idea"))
|
compile(project(":idea"))
|
||||||
compile(project(":idea:idea-jps-common"))
|
compile(project(":idea:idea-jps-common"))
|
||||||
|
compile(project(":idea:idea-gradle"))
|
||||||
|
compile(project(":idea:idea-maven"))
|
||||||
compileOnly(ideaPluginDeps("maven", "maven-server-api", plugin = "maven"))
|
compileOnly(ideaPluginDeps("maven", "maven-server-api", plugin = "maven"))
|
||||||
compileOnly(ideaPluginDeps("gradle-tooling-api", "gradle", plugin = "gradle"))
|
compileOnly(ideaPluginDeps("gradle-tooling-api", "gradle", plugin = "gradle"))
|
||||||
compileOnly(ideaSdkDeps("openapi", "idea"))
|
compileOnly(ideaSdkDeps("openapi", "idea"))
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ val compilerBaseName = name
|
|||||||
|
|
||||||
val outputJar = File(buildDir, "libs", "$compilerBaseName.jar")
|
val outputJar = File(buildDir, "libs", "$compilerBaseName.jar")
|
||||||
|
|
||||||
val jreHome = System.getProperty("java.home")
|
|
||||||
|
|
||||||
val compilerModules: Array<String> by rootProject.extra
|
val compilerModules: Array<String> by rootProject.extra
|
||||||
|
|
||||||
@@ -56,10 +56,6 @@ val packagesToRelocate =
|
|||||||
val ideaCoreSdkJars: Array<String> by rootProject.extra
|
val ideaCoreSdkJars: Array<String> by rootProject.extra
|
||||||
val coreSdkJarsSimple = ideaCoreSdkJars.filterNot { it == "jdom" || it == "log4j" }.toTypedArray()
|
val coreSdkJarsSimple = ideaCoreSdkJars.filterNot { it == "jdom" || it == "log4j" }.toTypedArray()
|
||||||
|
|
||||||
fun firstFromJavaHomeThatExists(vararg paths: String): File =
|
|
||||||
paths.mapNotNull { File(jreHome, it).takeIf { it.exists() } }.firstOrNull()
|
|
||||||
?: throw GradleException("Cannot find under '$jreHome' neither of: ${paths.joinToString()}")
|
|
||||||
|
|
||||||
compilerModules.forEach { evaluationDependsOn(it) }
|
compilerModules.forEach { evaluationDependsOn(it) }
|
||||||
|
|
||||||
val compiledModulesSources = compilerModules.map {
|
val compiledModulesSources = compilerModules.map {
|
||||||
@@ -87,7 +83,7 @@ dependencies {
|
|||||||
|
|
||||||
proguardLibraryJars(files(firstFromJavaHomeThatExists("lib/rt.jar", "../Classes/classes.jar"),
|
proguardLibraryJars(files(firstFromJavaHomeThatExists("lib/rt.jar", "../Classes/classes.jar"),
|
||||||
firstFromJavaHomeThatExists("lib/jsse.jar", "../Classes/jsse.jar"),
|
firstFromJavaHomeThatExists("lib/jsse.jar", "../Classes/jsse.jar"),
|
||||||
firstFromJavaHomeThatExists("../lib/tools.jar", "../Classes/tools.jar")))
|
toolsJar()))
|
||||||
proguardLibraryJars(projectDist(":kotlin-stdlib"))
|
proguardLibraryJars(projectDist(":kotlin-stdlib"))
|
||||||
proguardLibraryJars(projectDist(":kotlin-script-runtime"))
|
proguardLibraryJars(projectDist(":kotlin-script-runtime"))
|
||||||
proguardLibraryJars(projectDist(":kotlin-reflect"))
|
proguardLibraryJars(projectDist(":kotlin-reflect"))
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ val projectsToShadow = listOf(
|
|||||||
":idea:idea-android",
|
":idea:idea-android",
|
||||||
":idea:idea-android-output-parser",
|
":idea:idea-android-output-parser",
|
||||||
":idea:idea-core",
|
":idea:idea-core",
|
||||||
|
":idea:idea-jvm",
|
||||||
":idea:idea-jps-common",
|
":idea:idea-jps-common",
|
||||||
|
":idea:idea-gradle",
|
||||||
|
":idea:idea-maven",
|
||||||
//":idea-ultimate",
|
//":idea-ultimate",
|
||||||
":compiler:ir.psi2ir",
|
":compiler:ir.psi2ir",
|
||||||
":compiler:ir.tree",
|
":compiler:ir.tree",
|
||||||
@@ -79,6 +82,7 @@ val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ideaPlugin {
|
ideaPlugin {
|
||||||
|
shouldRunAfter(":dist")
|
||||||
from(jar)
|
from(jar)
|
||||||
from(sideJars)
|
from(sideJars)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ include ":kotlin-build-common",
|
|||||||
":core:builtins",
|
":core:builtins",
|
||||||
":core:util.runtime",
|
":core:util.runtime",
|
||||||
":custom-dependencies:protobuf-lite",
|
":custom-dependencies:protobuf-lite",
|
||||||
|
":idea:idea-jvm",
|
||||||
|
":idea:idea-maven",
|
||||||
|
":idea:idea-gradle",
|
||||||
":idea:idea-jps-common",
|
":idea:idea-jps-common",
|
||||||
":idea:formatter",
|
":idea:formatter",
|
||||||
":idea:ide-common",
|
":idea:ide-common",
|
||||||
@@ -61,6 +64,7 @@ include ":kotlin-build-common",
|
|||||||
":idea:idea-android-output-parser",
|
":idea:idea-android-output-parser",
|
||||||
":idea:idea-test-framework",
|
":idea:idea-test-framework",
|
||||||
":idea",
|
":idea",
|
||||||
|
":idea-runner",
|
||||||
":eval4j",
|
":eval4j",
|
||||||
":j2k",
|
":j2k",
|
||||||
":plugins:lint",
|
":plugins:lint",
|
||||||
|
|||||||
Reference in New Issue
Block a user