JPS Build: exclude :core:builtins, use prebuilt bootstrap version

This commit is contained in:
Sergey Rostov
2019-03-28 09:10:50 +03:00
parent fb3f28974e
commit 7b89b0abbb
13 changed files with 18 additions and 18 deletions
+1
View File
@@ -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"
+5 -4
View File
@@ -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")
-1
View File
@@ -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"))
}
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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"))
+1 -1
View File
@@ -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"))
+1 -1
View File
@@ -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"))
+1 -1
View File
@@ -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
View File
@@ -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",