JPS Build: exclude :core:builtins, use prebuilt bootstrap version
This commit is contained in:
@@ -312,6 +312,7 @@ allprojects {
|
||||
jcenter()
|
||||
maven(protobufRepo)
|
||||
maven(intellijRepo)
|
||||
maven(bootstrapKotlinRepo!!.replace("artifacts/content/maven/", "artifacts/content/internal/repo"))
|
||||
}
|
||||
|
||||
configureJvmProject(javaHome!!, jvmTarget!!)
|
||||
|
||||
@@ -52,6 +52,9 @@ class KotlinBuildProperties(
|
||||
|
||||
val includeJava9: Boolean
|
||||
get() = !isInJpsBuildIdeaSync
|
||||
|
||||
val useBootstrapStdlib: Boolean
|
||||
get() = isInJpsBuildIdeaSync
|
||||
}
|
||||
|
||||
private const val extensionName = "kotlinBuildFlags"
|
||||
|
||||
@@ -75,16 +75,17 @@ fun Project.ideaUltimatePreloadedDeps(vararg artifactBaseNames: String, subdir:
|
||||
|
||||
fun Project.kotlinDep(artifactBaseName: String, version: String): String = "org.jetbrains.kotlin:kotlin-$artifactBaseName:$version"
|
||||
|
||||
val Project.useBootstrapStdlib: Boolean
|
||||
get() = kotlinBuildProperties.isInJpsBuildIdeaSync
|
||||
|
||||
fun Project.kotlinStdlib(suffix: String? = null): Any {
|
||||
return if (useBootstrapStdlib)
|
||||
return if (kotlinBuildProperties.useBootstrapStdlib)
|
||||
kotlinDep(listOfNotNull("stdlib", suffix).joinToString("-"), bootstrapKotlinVersion)
|
||||
else
|
||||
dependencies.project(listOfNotNull(":kotlin-stdlib", suffix).joinToString("-"))
|
||||
}
|
||||
|
||||
fun Project.kotlinBuiltins(): Any =
|
||||
if (kotlinBuildProperties.useBootstrapStdlib) "org.jetbrains.kotlin:builtins:$bootstrapKotlinVersion"
|
||||
else dependencies.project(":core:builtins")
|
||||
|
||||
fun DependencyHandler.projectTests(name: String): ProjectDependency = project(name, configuration = "tests-jar")
|
||||
fun DependencyHandler.projectRuntimeJar(name: String): ProjectDependency = project(name, configuration = "runtimeJar")
|
||||
fun DependencyHandler.projectArchives(name: String): ProjectDependency = project(name, configuration = "archives")
|
||||
|
||||
@@ -65,7 +65,6 @@ dependencies {
|
||||
antLauncherJar(commonDep("org.apache.ant", "ant"))
|
||||
antLauncherJar(files(toolsJar()))
|
||||
|
||||
// For JPS build
|
||||
if (project.kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||
testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ dependencies {
|
||||
compile(project(module)) { isTransitive = false }
|
||||
}
|
||||
|
||||
fatJarContents(project(":core:builtins"))
|
||||
fatJarContents(kotlinBuiltins())
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
|
||||
@@ -4,10 +4,6 @@ import java.util.regex.Pattern
|
||||
|
||||
description = "Stdlib configuration for JPS build (to be interpreted during IDEA project import)"
|
||||
|
||||
repositories {
|
||||
maven(bootstrapKotlinRepo!!.replace("artifacts/content/maven/", "artifacts/content/internal/repo"))
|
||||
}
|
||||
|
||||
val distLib by configurations.creating
|
||||
val distCommon by configurations.creating
|
||||
val distRoot by configurations.creating
|
||||
|
||||
@@ -23,7 +23,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":core:builtins"))
|
||||
compile(kotlinBuiltins())
|
||||
}
|
||||
|
||||
publish()
|
||||
|
||||
@@ -20,7 +20,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':core:builtins')
|
||||
compile DependenciesKt.kotlinBuiltins(project)
|
||||
}
|
||||
|
||||
artifacts {
|
||||
|
||||
@@ -71,7 +71,7 @@ dependencies {
|
||||
|
||||
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
|
||||
|
||||
fatJarContents(project(":core:builtins"))
|
||||
fatJarContents(kotlinBuiltins())
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
|
||||
@@ -71,7 +71,7 @@ dependencies {
|
||||
|
||||
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
|
||||
|
||||
fatJarContents(project(":core:builtins"))
|
||||
fatJarContents(kotlinBuiltins())
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
|
||||
@@ -71,7 +71,7 @@ dependencies {
|
||||
|
||||
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
|
||||
|
||||
fatJarContents(project(":core:builtins"))
|
||||
fatJarContents(kotlinBuiltins())
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
|
||||
@@ -78,7 +78,7 @@ val sideJars by configurations.creating
|
||||
|
||||
dependencies {
|
||||
packedJars(protobufFull())
|
||||
packedJars(project(":core:builtins"))
|
||||
packedJars(kotlinBuiltins())
|
||||
sideJars(project(":kotlin-script-runtime"))
|
||||
sideJars(kotlinStdlib())
|
||||
sideJars(kotlinStdlib("jdk7"))
|
||||
|
||||
+2
-2
@@ -73,7 +73,6 @@ include ":kotlin-build-common",
|
||||
":core:descriptors.runtime",
|
||||
":core:metadata",
|
||||
":core:metadata.jvm",
|
||||
":core:builtins",
|
||||
":core:util.runtime",
|
||||
":dependencies:android-sdk",
|
||||
":idea:fir-view",
|
||||
@@ -229,7 +228,8 @@ if (flags.inJpsBuildIdeaSync) {
|
||||
include ":kotlin-idl2k"
|
||||
project(':kotlin-idl2k').projectDir = file("$rootDir/libraries/tools/idl2k")
|
||||
|
||||
include ":kotlin-stdlib-common",
|
||||
include ":core:builtins",
|
||||
":kotlin-stdlib-common",
|
||||
":kotlin-stdlib",
|
||||
":kotlin-stdlib-js",
|
||||
":kotlin-stdlib-jdk7",
|
||||
|
||||
Reference in New Issue
Block a user