mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
Adapt coop-dev for 212 platform
This commit is contained in:
committed by
teamcityserver
parent
3d81eba32b
commit
dac4fe7507
2
.gitignore
vendored
2
.gitignore
vendored
@@ -12,7 +12,7 @@
|
||||
/android-studio/sdk
|
||||
out/
|
||||
/tmp
|
||||
kotlin-ide/
|
||||
intellij/
|
||||
workspace.xml
|
||||
*.versionsBackup
|
||||
/idea/testData/debugger/tinyApp/classes*
|
||||
|
||||
@@ -89,4 +89,4 @@ val Project.isIdeaActive
|
||||
get() = providers.systemProperty("idea.active").forUseAtConfigurationTime().isPresent
|
||||
|
||||
val Project.intellijCommunityDir: File
|
||||
get() = rootDir.resolve("kotlin-ide/intellij/community").takeIf { it.isDirectory } ?: rootDir.resolve("kotlin-ide/intellij")
|
||||
get() = rootDir.resolve("intellij/community").takeIf { it.isDirectory } ?: rootDir.resolve("intellij")
|
||||
@@ -22,8 +22,8 @@ import kotlin.system.measureNanoTime
|
||||
|
||||
private lateinit var intellijModuleNameToGradleDependencyNotationsMapping: Map<String, List<GradleDependencyNotation>>
|
||||
private val KOTLIN_REPO_ROOT = File(".").canonicalFile
|
||||
private val INTELLIJ_REPO_ROOT = KOTLIN_REPO_ROOT.resolve("kotlin-ide")
|
||||
private val INTELLIJ_COMMUNITY_REPO_ROOT = INTELLIJ_REPO_ROOT.resolve("kotlin").takeIf { it.exists() } ?: INTELLIJ_REPO_ROOT
|
||||
private val INTELLIJ_REPO_ROOT = KOTLIN_REPO_ROOT.resolve("intellij").resolve("community").takeIf { it.exists() }
|
||||
?: KOTLIN_REPO_ROOT.resolve("intellij")
|
||||
|
||||
private val intellijModuleNameToGradleDependencyNotationsMappingManual: List<Pair<String, GradleDependencyNotation>> = listOf(
|
||||
"intellij.platform.jps.build" to GradleDependencyNotation("jpsBuildTest()"),
|
||||
@@ -46,6 +46,7 @@ val jsonUrlPrefixes = mapOf(
|
||||
"202" to "https://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_IjPlatform202_IntellijArtifactMappings/113235432:id",
|
||||
"203" to "https://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_IjPlatform203_IntellijArtifactMappings/117989041:id",
|
||||
"211" to "https://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_IjPlatform211_IntellijArtifactMappings/121258191:id",
|
||||
"212" to "https://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_IjPlatform211_IntellijArtifactMappings/131509697:id",
|
||||
)
|
||||
|
||||
fun main() {
|
||||
@@ -115,12 +116,12 @@ fun convertJpsLibrary(lib: JpsLibrary, scope: JpsJavaDependencyScope, exported:
|
||||
mavenRepositoryLibraryDescriptor == null -> {
|
||||
lib.getRootUrls(JpsOrderRootType.COMPILED)
|
||||
.map {
|
||||
it.removePrefix("jar://").removeSuffix("!/")
|
||||
val relativeToCommunity = it.removePrefix("jar://").removeSuffix("!/")
|
||||
.removePrefix(KOTLIN_REPO_ROOT.canonicalPath.replace("\\", "/"))
|
||||
}
|
||||
.map {
|
||||
check(it.startsWith("/kotlin-ide/intellij/")) { "Only jars from Community repo are accepted $it" }
|
||||
val relativeToCommunity = it.removePrefix("/kotlin-ide/intellij/").removePrefix("community/")
|
||||
.also {
|
||||
check(it.startsWith("/intellij/")) { "Only jars from Community repo are accepted $it" }
|
||||
}
|
||||
.removePrefix("/intellij/").removePrefix("community/")
|
||||
JpsLikeJarDependency(
|
||||
"files(intellijCommunityDir.resolve(\"$relativeToCommunity\").canonicalPath)",
|
||||
scope,
|
||||
@@ -214,7 +215,7 @@ fun convertJpsModule(imlFile: File, jpsModule: JpsModule): String {
|
||||
.mapValues { entry -> entry.value.joinToString("\n") { convertJpsModuleSourceRoot(imlFile, it) } }
|
||||
.let { Pair(it[false] ?: "", it[true] ?: "") }
|
||||
|
||||
val mavenRepos = INTELLIJ_COMMUNITY_REPO_ROOT.resolve(".idea/jarRepositories.xml").readXml().traverseChildren()
|
||||
val mavenRepos = INTELLIJ_REPO_ROOT.resolve(".idea/jarRepositories.xml").readXml().traverseChildren()
|
||||
.filter { it.getAttributeValue("name") == "url" }
|
||||
.map { it.getAttributeValue("value")!! }
|
||||
.map { "maven { setUrl(\"$it\") }" }
|
||||
|
||||
@@ -2,6 +2,7 @@ versions.intellijSdk=203.8084.24
|
||||
versions.intellijSdk.forIde.202=202.7660.26
|
||||
versions.intellijSdk.forIde.203=203.6682.168
|
||||
versions.intellijSdk.forIde.211=211.7442.40
|
||||
versions.intellijSdk.forIde.212=212.4746.92
|
||||
versions.idea.NodeJS=193.6494.7
|
||||
versions.jar.asm-all=9.0
|
||||
versions.jar.guava=29.0-jre
|
||||
|
||||
182
settings.gradle
182
settings.gradle
@@ -329,11 +329,11 @@ if (!buildProperties.inJpsBuildIdeaSync) {
|
||||
":prepare:ide-plugin-dependencies:high-level-api-fir-tests-for-ide"
|
||||
}
|
||||
|
||||
void kotlinIde(String imlPath) {
|
||||
File imlFile = new File("${rootDir}/kotlin-ide/kotlin/${imlPath}")
|
||||
imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/kotlin-ide/${imlPath}")
|
||||
imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/kotlin-ide/intellij/community/${imlPath}")
|
||||
imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/kotlin-ide/intellij/${imlPath}")
|
||||
void intellij(String imlPath) {
|
||||
File imlFile = new File("${rootDir}/intellij/community/plugins/kotlin/${imlPath}")
|
||||
imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/intellij/plugins/kotlin/${imlPath}")
|
||||
imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/intellij/community/${imlPath}")
|
||||
imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/intellij/${imlPath}")
|
||||
assert imlFile.exists()
|
||||
String fileName = imlFile.name
|
||||
String projectName = ":kotlin-ide.${fileName.substring(0, fileName.length() - ".iml".length())}"
|
||||
@@ -342,89 +342,97 @@ void kotlinIde(String imlPath) {
|
||||
}
|
||||
|
||||
String attachedIntellijVersion = buildProperties.getOrNull("attachedIntellijVersion")
|
||||
if (attachedIntellijVersion != null) {
|
||||
if (attachedIntellijVersion == "212") { // Latest available platform in scope of KT release cycle
|
||||
logger.info("Including kotlin-ide modules in settings.gradle")
|
||||
kotlinIde "common/kotlin.common.iml"
|
||||
kotlinIde "compiler-plugins/allopen/kotlin.compiler-plugins.allopen.iml"
|
||||
kotlinIde "compiler-plugins/annotation-based-compiler-support/kotlin.compiler-plugins.annotation-based-compiler-support.iml"
|
||||
kotlinIde "compiler-plugins/base-compiler-plugins-ide-support/kotlin.compiler-plugins.base-compiler-plugins-ide-support.iml"
|
||||
kotlinIde "compiler-plugins/kapt/kotlin.compiler-plugins.kapt.iml"
|
||||
kotlinIde "compiler-plugins/kotlinx-serialization/kotlin.compiler-plugins.kotlinx-serialization.iml"
|
||||
kotlinIde "compiler-plugins/lombok/kotlin.compiler-plugins.lombok.iml"
|
||||
kotlinIde "compiler-plugins/noarg/kotlin.compiler-plugins.noarg.iml"
|
||||
kotlinIde "compiler-plugins/parcelize/kotlin.compiler-plugins.parcelize.iml"
|
||||
kotlinIde "compiler-plugins/sam-with-receiver/kotlin.compiler-plugins.sam-with-receiver.iml"
|
||||
kotlinIde "compiler-plugins/scripting-ide-services/kotlin.compiler-plugins.scripting-ide-services.iml"
|
||||
kotlinIde "compiler-plugins/scripting/kotlin.compiler-plugins.scripting.iml"
|
||||
kotlinIde "core/kotlin.core.iml"
|
||||
kotlinIde "formatter/kotlin.formatter.iml"
|
||||
kotlinIde "frontend-independent/kotlin.fir.frontend-independent.iml"
|
||||
kotlinIde "frontend-independent/tests/kotlin.fir.frontend-independent.tests.iml"
|
||||
kotlinIde "generators/kotlin.generators.iml"
|
||||
kotlinIde "git/kotlin.git.iml"
|
||||
kotlinIde "gradle/gradle-idea/kotlin.gradle.gradle-idea.iml"
|
||||
kotlinIde "gradle/gradle-native/kotlin.gradle.gradle-native.iml"
|
||||
kotlinIde "gradle/gradle-tooling/kotlin.gradle.gradle-tooling.iml"
|
||||
kotlinIde "idea/kotlin.idea.iml"
|
||||
kotlinIde "idea/tests/kotlin.idea.tests.iml"
|
||||
kotlinIde "j2k/idea/kotlin.j2k.idea.iml"
|
||||
kotlinIde "j2k/new/kotlin.j2k.new.iml"
|
||||
kotlinIde "j2k/new/tests/kotlin.j2k.new.tests.iml"
|
||||
kotlinIde "j2k/old/kotlin.j2k.old.iml"
|
||||
kotlinIde "j2k/old/tests/kotlin.j2k.old.tests.iml"
|
||||
kotlinIde "j2k/services/kotlin.j2k.services.iml"
|
||||
kotlinIde "java/compiler/intellij.java.compiler.tests.iml"
|
||||
kotlinIde "jps/jps-common/kotlin.jps-common.iml"
|
||||
kotlinIde "jps/jps-plugin/kotlin.jps-plugin.iml"
|
||||
kotlinIde "jvm-debugger/core/kotlin.jvm-debugger.core.iml"
|
||||
kotlinIde "jvm-debugger/coroutines/kotlin.jvm-debugger.coroutines.iml"
|
||||
kotlinIde "jvm-debugger/eval4j/kotlin.eval4j.iml"
|
||||
kotlinIde "jvm-debugger/evaluation/kotlin.jvm-debugger.evaluation.iml"
|
||||
kotlinIde "jvm-debugger/sequence/kotlin.jvm-debugger.sequence.iml"
|
||||
kotlinIde "jvm-debugger/test/kotlin.jvm-debugger.test.iml"
|
||||
kotlinIde "jvm-debugger/util/kotlin.jvm-debugger.util.iml"
|
||||
kotlinIde "jvm-run-configurations/kotlin.jvm-run-configurations.iml"
|
||||
kotlinIde "jvm/kotlin.jvm.iml"
|
||||
kotlinIde "kotlin.all-tests/kotlin.all-tests.iml"
|
||||
kotlinIde "kotlin-compiler-classpath/kotlin.util.compiler-classpath.iml"
|
||||
kotlinIde "line-indent-provider/kotlin.line-indent-provider.iml"
|
||||
kotlinIde "maven/kotlin.maven.iml"
|
||||
kotlinIde "native/kotlin.native.iml"
|
||||
kotlinIde "performance-tests/kotlin.performance-tests.iml"
|
||||
kotlinIde "platform/external-system-impl/intellij.platform.externalSystem.tests.iml"
|
||||
kotlinIde "platform/lang-impl/intellij.platform.lang.tests.iml"
|
||||
kotlinIde "platform/testFramework/extensions/intellij.platform.testExtensions.iml"
|
||||
kotlinIde "platform/xdebugger-testFramework/intellij.platform.debugger.testFramework.iml"
|
||||
kotlinIde "plugins/gradle/intellij.gradle.tests.iml"
|
||||
kotlinIde "plugins/gradle/tooling-extension-impl/intellij.gradle.toolingExtension.tests.iml"
|
||||
kotlinIde "plugins/maven/intellij.maven.iml"
|
||||
kotlinIde "project-wizard/cli/kotlin.project-wizard.cli.iml"
|
||||
kotlinIde "project-wizard/core/kotlin.project-wizard.core.iml"
|
||||
kotlinIde "project-wizard/idea/kotlin.project-wizard.idea.iml"
|
||||
kotlinIde "repl/kotlin.repl.iml"
|
||||
kotlinIde "scripting/kotlin.scripting.iml"
|
||||
kotlinIde "scripting-support/kotlin.scripting-support.iml"
|
||||
kotlinIde "test-framework/kotlin.test-framework.iml"
|
||||
kotlinIde "tests-common/kotlin.tests-common.iml"
|
||||
kotlinIde "uast/uast-kotlin-base/kotlin.uast.uast-kotlin-base.iml"
|
||||
kotlinIde "uast/uast-kotlin-idea-base/kotlin.uast.uast-kotlin-idea-base.iml"
|
||||
kotlinIde "uast/uast-kotlin-idea-fir/kotlin.uast.uast-kotlin-idea-fir.iml"
|
||||
kotlinIde "uast/uast-kotlin-idea/kotlin.uast.uast-kotlin-idea.iml"
|
||||
kotlinIde "uast/uast-kotlin/kotlin.uast.uast-kotlin.iml"
|
||||
}
|
||||
|
||||
if (attachedIntellijVersion > "202") {
|
||||
kotlinIde "resources-fe10/kotlin.resources-fe10.iml"
|
||||
}
|
||||
|
||||
if (attachedIntellijVersion == "211") { // Latest available platform in scope of KT release cycle
|
||||
kotlinIde "kotlin.fir-all-tests/kotlin.fir-all-tests.iml"
|
||||
kotlinIde "resources-fir/kotlin.resources-fir.iml"
|
||||
kotlinIde "fir-fe10-binding/kotlin.fir.fir-fe10-binding.iml"
|
||||
kotlinIde "fir/kotlin.fir.iml"
|
||||
kotlinIde "fir-low-level-api-ide-impl/kotlin.fir.fir-low-level-api-ide-impl.iml"
|
||||
kotlinIde "uast/uast-kotlin-fir/kotlin.uast.uast-kotlin-fir.iml"
|
||||
|
||||
intellij "java/compiler/intellij.java.compiler.tests.iml"
|
||||
intellij "platform/testFramework/extensions/intellij.platform.testExtensions.iml"
|
||||
intellij "platform/lang-impl/intellij.platform.lang.tests.iml"
|
||||
intellij "platform/xdebugger-testFramework/intellij.platform.debugger.testFramework.iml"
|
||||
intellij "platform/external-system-impl/intellij.platform.externalSystem.tests.iml"
|
||||
intellij "jvm-debugger/core/kotlin.jvm-debugger.core.iml"
|
||||
intellij "jvm-debugger/util/kotlin.jvm-debugger.util.iml"
|
||||
intellij "jvm-debugger/eval4j/kotlin.eval4j.iml"
|
||||
intellij "jvm-debugger/test/kotlin.jvm-debugger.test.iml"
|
||||
intellij "jvm-debugger/evaluation/kotlin.jvm-debugger.evaluation.iml"
|
||||
intellij "jvm-debugger/coroutines/kotlin.jvm-debugger.coroutines.iml"
|
||||
intellij "jvm-debugger/sequence/kotlin.jvm-debugger.sequence.iml"
|
||||
intellij "jvm/kotlin.jvm.iml"
|
||||
intellij "core/kotlin.core.iml"
|
||||
intellij "common/kotlin.common.iml"
|
||||
intellij "tests-common/kotlin.tests-common.iml"
|
||||
intellij "util/compiler-dependencies/kotlin.util.compiler-dependencies.iml"
|
||||
intellij "j2k/services/kotlin.j2k.services.iml"
|
||||
intellij "j2k/old/kotlin.j2k.old.iml"
|
||||
intellij "j2k/old/tests/kotlin.j2k.old.tests.iml"
|
||||
intellij "j2k/idea/kotlin.j2k.idea.iml"
|
||||
intellij "j2k/new/tests/kotlin.j2k.new.tests.iml"
|
||||
intellij "j2k/new/kotlin.j2k.new.iml"
|
||||
intellij "fir-low-level-api-ide-impl/kotlin.fir.fir-low-level-api-ide-impl.iml"
|
||||
intellij "native/kotlin.native.iml"
|
||||
intellij "performance-tests/kotlin.performance-tests.iml"
|
||||
intellij "injection/kotlin.injection.iml"
|
||||
intellij "resources-fe10/kotlin.resources-fe10.iml"
|
||||
intellij "git/kotlin.git.iml"
|
||||
intellij "idea/tests/kotlin.idea.tests.iml"
|
||||
intellij "idea/kotlin.idea.iml"
|
||||
intellij "jps/jps-plugin/kotlin.jps-plugin.iml"
|
||||
intellij "jps/jps-common/kotlin.jps-common.iml"
|
||||
intellij "project-wizard/core/kotlin.project-wizard.core.iml"
|
||||
intellij "project-wizard/idea/kotlin.project-wizard.idea.iml"
|
||||
intellij "project-wizard/cli/kotlin.project-wizard.cli.iml"
|
||||
intellij "resources-fir/kotlin.resources-fir.iml"
|
||||
intellij "kotlin.all-tests/kotlin.all-tests.iml"
|
||||
intellij "i18n/kotlin.i18n.iml"
|
||||
intellij "uast/uast-kotlin-idea-fir/kotlin.uast.uast-kotlin-idea-fir.iml"
|
||||
intellij "uast/uast-kotlin-idea/kotlin.uast.uast-kotlin-idea.iml"
|
||||
intellij "uast/uast-kotlin-fir/kotlin.uast.uast-kotlin-fir.iml"
|
||||
intellij "uast/uast-kotlin-base/kotlin.uast.uast-kotlin-base.iml"
|
||||
intellij "uast/uast-kotlin-idea-base/kotlin.uast.uast-kotlin-idea-base.iml"
|
||||
intellij "uast/uast-kotlin/kotlin.uast.uast-kotlin.iml"
|
||||
intellij "test-framework/kotlin.test-framework.iml"
|
||||
intellij "generators/kotlin.generators.iml"
|
||||
intellij "gradle/gradle-native/kotlin.gradle.gradle-native.iml"
|
||||
intellij "gradle/gradle-idea/kotlin.gradle.gradle-idea.iml"
|
||||
intellij "gradle/gradle-tooling/kotlin.gradle.gradle-tooling.iml"
|
||||
intellij "scripting/kotlin.scripting.iml"
|
||||
intellij "compiler-plugins/allopen/common/kotlin.compiler-plugins.allopen.common.iml"
|
||||
intellij "compiler-plugins/allopen/tests/kotlin.compiler-plugins.allopen.tests.iml"
|
||||
intellij "compiler-plugins/allopen/gradle/kotlin.compiler-plugins.allopen.gradle.iml"
|
||||
intellij "compiler-plugins/allopen/maven/kotlin.compiler-plugins.allopen.maven.iml"
|
||||
intellij "compiler-plugins/annotation-based-compiler-support/common/kotlin.compiler-plugins.annotation-based-compiler-support.common.iml"
|
||||
intellij "compiler-plugins/annotation-based-compiler-support/gradle/kotlin.compiler-plugins.annotation-based-compiler-support.gradle.iml"
|
||||
intellij "compiler-plugins/annotation-based-compiler-support/maven/kotlin.compiler-plugins.annotation-based-compiler-support.maven.iml"
|
||||
intellij "compiler-plugins/kapt/kotlin.compiler-plugins.kapt.iml"
|
||||
intellij "compiler-plugins/kotlinx-serialization/common/kotlin.compiler-plugins.kotlinx-serialization.common.iml"
|
||||
intellij "compiler-plugins/kotlinx-serialization/gradle/kotlin.compiler-plugins.kotlinx-serialization.gradle.iml"
|
||||
intellij "compiler-plugins/kotlinx-serialization/maven/kotlin.compiler-plugins.kotlinx-serialization.maven.iml"
|
||||
intellij "compiler-plugins/parcelize/common/kotlin.compiler-plugins.parcelize.common.iml"
|
||||
intellij "compiler-plugins/parcelize/tests/kotlin.compiler-plugins.parcelize.tests.iml"
|
||||
intellij "compiler-plugins/parcelize/gradle/kotlin.compiler-plugins.parcelize.gradle.iml"
|
||||
intellij "compiler-plugins/scripting/kotlin.compiler-plugins.scripting.iml"
|
||||
intellij "compiler-plugins/noarg/common/kotlin.compiler-plugins.noarg.common.iml"
|
||||
intellij "compiler-plugins/noarg/tests/kotlin.compiler-plugins.noarg.tests.iml"
|
||||
intellij "compiler-plugins/noarg/gradle/kotlin.compiler-plugins.noarg.gradle.iml"
|
||||
intellij "compiler-plugins/noarg/maven/kotlin.compiler-plugins.noarg.maven.iml"
|
||||
intellij "compiler-plugins/lombok/kotlin.compiler-plugins.lombok.iml"
|
||||
intellij "compiler-plugins/sam-with-receiver/common/kotlin.compiler-plugins.sam-with-receiver.common.iml"
|
||||
intellij "compiler-plugins/sam-with-receiver/gradle/kotlin.compiler-plugins.sam-with-receiver.gradle.iml"
|
||||
intellij "compiler-plugins/sam-with-receiver/maven/kotlin.compiler-plugins.sam-with-receiver.maven.iml"
|
||||
intellij "compiler-plugins/base-compiler-plugins-ide-support/kotlin.compiler-plugins.base-compiler-plugins-ide-support.iml"
|
||||
intellij "line-indent-provider/kotlin.line-indent-provider.iml"
|
||||
intellij "scripting-support/kotlin.scripting-support.iml"
|
||||
intellij "formatter/kotlin.formatter.iml"
|
||||
intellij "fir/kotlin.fir.iml"
|
||||
intellij "fir-fe10-binding/kotlin.fir.fir-fe10-binding.iml"
|
||||
intellij "maven/tests/kotlin.maven.tests.iml"
|
||||
intellij "maven/kotlin.maven.iml"
|
||||
intellij "frontend-independent/tests/kotlin.fir.frontend-independent.tests.iml"
|
||||
intellij "frontend-independent/kotlin.fir.frontend-independent.iml"
|
||||
intellij "kotlin-compiler-classpath/kotlin.util.compiler-classpath.iml"
|
||||
intellij "repl/kotlin.repl.iml"
|
||||
intellij "plugins/gradle/tooling-extension-impl/intellij.gradle.toolingExtension.tests.iml"
|
||||
intellij "plugins/gradle/intellij.gradle.tests.iml"
|
||||
intellij "plugins/maven/intellij.maven.iml"
|
||||
}
|
||||
|
||||
include ":generators:frontend-api-generator",
|
||||
|
||||
Reference in New Issue
Block a user