JPS build: add dependencies to stdlib
This commit is contained in:
+1
-1
@@ -38,5 +38,5 @@ build/
|
|||||||
.idea/compiler.xml
|
.idea/compiler.xml
|
||||||
.idea/inspectionProfiles/profiles_settings.xml
|
.idea/inspectionProfiles/profiles_settings.xml
|
||||||
.idea/.name
|
.idea/.name
|
||||||
.idea/artifacts/dist_auto_reference_dont_use.xml
|
.idea/artifacts/dist_auto_*
|
||||||
kotlin-ultimate/
|
kotlin-ultimate/
|
||||||
|
|||||||
+2
-1
@@ -80,6 +80,8 @@ val appcodeKotlinPlugin by configurations.creating
|
|||||||
val clionKotlinPlugin by configurations.creating
|
val clionKotlinPlugin by configurations.creating
|
||||||
|
|
||||||
val includeCidr by extra(project.getBooleanProperty("cidrPluginsEnabled") ?: false)
|
val includeCidr by extra(project.getBooleanProperty("cidrPluginsEnabled") ?: false)
|
||||||
|
val isJpsBuildEnabled = findProperty("jpsBuild")?.toString() == "true"
|
||||||
|
val jpsBootstrap by configurations.creating
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
if (includeCidr) {
|
if (includeCidr) {
|
||||||
@@ -836,7 +838,6 @@ fun org.jetbrains.gradle.ext.JUnit.configureForKotlin() {
|
|||||||
workingDirectory = rootDir.toString()
|
workingDirectory = rootDir.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
val isJpsBuildEnabled = findProperty("jpsBuild")?.toString() == "true"
|
|
||||||
if (isJpsBuildEnabled && System.getProperty("idea.active") != null) {
|
if (isJpsBuildEnabled && System.getProperty("idea.active") != null) {
|
||||||
allprojects {
|
allprojects {
|
||||||
apply(mapOf("plugin" to "idea"))
|
apply(mapOf("plugin" to "idea"))
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
import org.gradle.kotlin.dsl.*
|
||||||
|
import org.jetbrains.gradle.ext.TopLevelArtifact
|
||||||
|
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
|
||||||
|
val builtins by configurations.creating
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
distRoot("org.jetbrains.kotlin:kotlin-stdlib-minimal-for-test:$bootstrapKotlinVersion")
|
||||||
|
builtins("org.jetbrains.kotlin:builtins:$bootstrapKotlinVersion")
|
||||||
|
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion")
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib-js:$bootstrapKotlinVersion")
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$bootstrapKotlinVersion")
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$bootstrapKotlinVersion")
|
||||||
|
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion:sources")
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib-js:$bootstrapKotlinVersion:sources")
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$bootstrapKotlinVersion:sources")
|
||||||
|
distLib("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$bootstrapKotlinVersion:sources")
|
||||||
|
|
||||||
|
distCommon("org.jetbrains.kotlin:kotlin-stdlib-common:$bootstrapKotlinVersion")
|
||||||
|
distCommon("org.jetbrains.kotlin:kotlin-stdlib-common:$bootstrapKotlinVersion:sources")
|
||||||
|
}
|
||||||
|
|
||||||
|
val distDir: String by rootProject.extra
|
||||||
|
val distLibDir: File by rootProject.extra
|
||||||
|
|
||||||
|
fun TopLevelArtifact.addFromConfiguration(configuration: Configuration) {
|
||||||
|
configuration.resolve().forEach {
|
||||||
|
file(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
rootProject.idea {
|
||||||
|
project {
|
||||||
|
settings {
|
||||||
|
ideArtifacts {
|
||||||
|
create("dist_auto_stdlib_reference_dont_use") {
|
||||||
|
addFromConfiguration(distRoot)
|
||||||
|
addFromConfiguration(distCommon)
|
||||||
|
addFromConfiguration(distLib)
|
||||||
|
addFromConfiguration(builtins)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task<Copy>("distRoot") {
|
||||||
|
destinationDir = File(distDir)
|
||||||
|
dependsOn(distRoot)
|
||||||
|
from(distRoot)
|
||||||
|
rename("-${Pattern.quote(bootstrapKotlinVersion)}", "")
|
||||||
|
}
|
||||||
|
|
||||||
|
task<Copy>("distLib") {
|
||||||
|
destinationDir = distLibDir
|
||||||
|
dependsOn(distLib)
|
||||||
|
from(distLib)
|
||||||
|
|
||||||
|
rename("-${Pattern.quote(bootstrapKotlinVersion)}", "")
|
||||||
|
}
|
||||||
@@ -221,6 +221,9 @@ def isJpsBuild = hasProperty("jpsBuild") && jpsBuild == 'true'
|
|||||||
def includeStdlib = !hasProperty("useBootstrapStdlib") || useBootstrapStdlib == 'false'
|
def includeStdlib = !hasProperty("useBootstrapStdlib") || useBootstrapStdlib == 'false'
|
||||||
if (isJpsBuild) {
|
if (isJpsBuild) {
|
||||||
includeStdlib = false
|
includeStdlib = false
|
||||||
|
|
||||||
|
include ":kotlin-stdlib:jps-build"
|
||||||
|
project(":kotlin-stdlib:jps-build").projectDir = "$rootDir/libraries/stdlib/jps-build" as File
|
||||||
} else {
|
} else {
|
||||||
// modules that we are currently cannot compile with jps
|
// modules that we are currently cannot compile with jps
|
||||||
include ":kotlin-idl2k"
|
include ":kotlin-idl2k"
|
||||||
|
|||||||
Reference in New Issue
Block a user