Apply rri/yole/modularize, create gradle run configuration for IDEA
This commit is contained in:
committed by
Ilya Chernikov
parent
7cb8a90513
commit
360a692af8
@@ -37,7 +37,7 @@ val compilerBaseName = name
|
||||
|
||||
val outputJar = File(buildDir, "libs", "$compilerBaseName.jar")
|
||||
|
||||
val jreHome = System.getProperty("java.home")
|
||||
|
||||
|
||||
val compilerModules: Array<String> by rootProject.extra
|
||||
|
||||
@@ -56,10 +56,6 @@ val packagesToRelocate =
|
||||
val ideaCoreSdkJars: Array<String> by rootProject.extra
|
||||
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) }
|
||||
|
||||
val compiledModulesSources = compilerModules.map {
|
||||
@@ -87,7 +83,7 @@ dependencies {
|
||||
|
||||
proguardLibraryJars(files(firstFromJavaHomeThatExists("lib/rt.jar", "../Classes/classes.jar"),
|
||||
firstFromJavaHomeThatExists("lib/jsse.jar", "../Classes/jsse.jar"),
|
||||
firstFromJavaHomeThatExists("../lib/tools.jar", "../Classes/tools.jar")))
|
||||
toolsJar()))
|
||||
proguardLibraryJars(projectDist(":kotlin-stdlib"))
|
||||
proguardLibraryJars(projectDist(":kotlin-script-runtime"))
|
||||
proguardLibraryJars(projectDist(":kotlin-reflect"))
|
||||
|
||||
@@ -37,7 +37,10 @@ val projectsToShadow = listOf(
|
||||
":idea:idea-android",
|
||||
":idea:idea-android-output-parser",
|
||||
":idea:idea-core",
|
||||
":idea:idea-jvm",
|
||||
":idea:idea-jps-common",
|
||||
":idea:idea-gradle",
|
||||
":idea:idea-maven",
|
||||
//":idea-ultimate",
|
||||
":compiler:ir.psi2ir",
|
||||
":compiler:ir.tree",
|
||||
@@ -79,6 +82,7 @@ val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
|
||||
}
|
||||
|
||||
ideaPlugin {
|
||||
shouldRunAfter(":dist")
|
||||
from(jar)
|
||||
from(sideJars)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user