Cleanup 193 compatibility fixes

This commit is contained in:
Vyacheslav Gerasimov
2020-11-06 02:53:05 +03:00
parent 8620d26a8a
commit 3feff16a77
118 changed files with 305 additions and 715 deletions
+1 -3
View File
@@ -34,9 +34,7 @@ dependencies {
Platform[201].orLower {
testCompile(intellijDep()) { includeJars("groovy-all", rootProject = rootProject) }
}
Platform[192].orHigher {
testCompile(intellijPluginDep("java")) { includeJars("jps-builders") }
}
testCompile(intellijPluginDep("java")) { includeJars("jps-builders") }
testCompile(jpsStandalone()) { includeJars("jps-model") }
testCompile(jpsBuildTest())
}
+1 -6
View File
@@ -57,14 +57,9 @@ dependencies {
testCompileOnly(project(it))
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
Platform[193].orLower {
testCompileOnly(intellijDep()) { includeJars("openapi", rootProject = rootProject) }
}
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "util", "asm-all", rootProject = rootProject) }
Platform[192].orHigher {
testRuntimeOnly(intellijPluginDep("java"))
}
testRuntimeOnly(intellijPluginDep("java"))
testRuntime(project(":kotlin-reflect"))
testRuntime(androidDxJar())
@@ -102,6 +102,7 @@ import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactory
import org.jetbrains.kotlin.serialization.DescriptorSerializerPlugin
import org.jetbrains.kotlin.utils.PathUtil
import java.io.File
import java.nio.file.FileSystems
import java.util.zip.ZipFile
class KotlinCoreEnvironment private constructor(
@@ -536,7 +537,11 @@ class KotlinCoreEnvironment private constructor(
"(cp:\n ${(Thread.currentThread().contextClassLoader as? UrlClassLoader)?.urls?.joinToString("\n ") { it.file }})"
)
registerExtensionPointAndExtensionsEx(pluginRoot, configFilePath, Extensions.getRootArea())
CoreApplicationEnvironment.registerExtensionPointAndExtensions(
FileSystems.getDefault().getPath(pluginRoot.path),
configFilePath,
Extensions.getRootArea()
)
}
@JvmStatic
@@ -106,6 +106,7 @@ import org.jetbrains.kotlin.resolve.lazy.declarations.DeclarationProviderFactory
import org.jetbrains.kotlin.serialization.DescriptorSerializerPlugin
import org.jetbrains.kotlin.utils.PathUtil
import java.io.File
import java.nio.file.FileSystems
import java.util.zip.ZipFile
class KotlinCoreEnvironment private constructor(
@@ -534,7 +535,11 @@ class KotlinCoreEnvironment private constructor(
"(cp:\n ${(Thread.currentThread().contextClassLoader as? UrlClassLoader)?.urls?.joinToString("\n ") { it.file }})"
)
registerExtensionPointAndExtensionsEx(pluginRoot, configFilePath, Extensions.getRootArea())
CoreApplicationEnvironment.registerExtensionPointAndExtensions(
FileSystems.getDefault().getPath(pluginRoot.path),
configFilePath,
Extensions.getRootArea()
)
}
@JvmStatic
@@ -1,18 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.cli.jvm.compiler
import com.intellij.core.CoreApplicationEnvironment
import com.intellij.openapi.extensions.ExtensionsArea
import java.io.File
import java.nio.file.FileSystems
// FIX ME WHEN BUNCH 193 REMOVED
fun registerExtensionPointAndExtensionsEx(pluginFile: File, fileName: String, area: ExtensionsArea) {
val pluginRoot = FileSystems.getDefault().getPath(pluginFile.path)
@Suppress("MissingRecentApi")
CoreApplicationEnvironment.registerExtensionPointAndExtensions(pluginRoot, fileName, area)
}
+2 -4
View File
@@ -25,10 +25,8 @@ dependencies {
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":core:descriptors.runtime"))
Platform[192].orHigher {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
sourceSets {
+2 -4
View File
@@ -30,10 +30,8 @@ dependencies {
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
Platform[192].orHigher {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
sourceSets {
@@ -17,10 +17,8 @@ dependencies {
includeJars("extensions", "idea_rt", "util", "asm-all", "platform-util-ex", rootProject = rootProject)
}
Platform[192].orHigher {
testCompileOnly(intellijPluginDep("java")) { includeJars("java-api") }
testRuntimeOnly(intellijPluginDep("java"))
}
testCompileOnly(intellijPluginDep("java")) { includeJars("java-api") }
testRuntimeOnly(intellijPluginDep("java"))
testRuntimeOnly(intellijDep())
@@ -37,10 +37,8 @@ dependencies {
implementation("org.openjdk.jmh", "jmh-generator-bytecode", jmhVersion)
implementation("org.openjdk.jmh", "jmh-generator-annprocess", jmhVersion)
Platform[192].orHigher {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
sourceSets {
@@ -27,10 +27,8 @@ dependencies {
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
Platform[192].orHigher {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
sourceSets {
@@ -16,10 +16,8 @@ dependencies {
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
Platform[192].orHigher {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
sourceSets {
@@ -23,9 +23,7 @@ dependencies {
includeJars("trove4j", rootProject = rootProject)
}
Platform[192].orHigher {
runtimeOnly(intellijCoreDep()) { includeJars("jdom") }
}
runtimeOnly(intellijCoreDep()) { includeJars("jdom") }
}
val writeCopyright by task<WriteCopyrightToFile> {
+2 -4
View File
@@ -11,10 +11,8 @@ dependencies {
compile(project(":compiler:frontend.java"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
Platform[192].orHigher {
compileOnly(intellijDep()) { includeJars("platform-core-ui", "platform-util-ui") }
}
compileOnly(intellijDep()) { includeJars("platform-core-ui", "platform-util-ui") }
compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "guava", rootProject = rootProject) }
}
+2 -7
View File
@@ -92,13 +92,8 @@ dependencies {
isTransitive = false
}
Platform[192].orHigher {
testCompile(intellijDep()) { includeJars("platform-util-ui", "platform-concurrency", "platform-objectSerializer") }
}
Platform[193].orHigher {
testCompile(intellijDep()) { includeJars("platform-ide-util-io") }
}
testCompile(intellijDep()) { includeJars("platform-util-ui", "platform-concurrency", "platform-objectSerializer") }
testCompile(intellijDep()) { includeJars("platform-ide-util-io") }
}
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
-109
View File
@@ -1,109 +0,0 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testCompile(project(":kotlin-scripting-compiler"))
testCompile(project(":core:descriptors"))
testCompile(project(":core:descriptors.jvm"))
testCompile(project(":core:deserialization"))
testCompile(project(":compiler:util"))
testCompile(project(":compiler:tests-mutes"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:ir.tree.impl"))
testCompile(project(":compiler:fir:tree"))
testCompile(project(":compiler:fir:raw-fir:psi2fir"))
testCompile(project(":compiler:fir:raw-fir:light-tree2fir"))
testCompile(project(":compiler:fir:fir2ir"))
testCompile(project(":compiler:fir:jvm"))
testCompile(project(":compiler:fir:fir2ir:jvm-backend"))
testCompile(project(":compiler:fir:fir-serialization"))
testCompile(project(":compiler:fir:fir-deserialization"))
testCompile(project(":compiler:fir:cones"))
testCompile(project(":compiler:fir:resolve"))
testCompile(project(":compiler:fir:checkers"))
testCompile(project(":compiler:fir:java"))
testCompile(project(":compiler:fir:entrypoint"))
testCompile(project(":compiler:ir.ir2cfg"))
testCompile(project(":compiler:frontend"))
testCompile(project(":compiler:frontend.java"))
testCompile(project(":compiler:util"))
testCompile(project(":compiler:cli-common"))
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:cli-js"))
testCompile(project(":compiler:light-classes"))
testCompile(project(":compiler:serialization"))
testCompile(project(":kotlin-preloader"))
testCompile(project(":compiler:cli-common"))
testCompile(project(":daemon-common"))
testCompile(project(":daemon-common-new"))
testCompile(project(":js:js.serializer"))
testCompile(project(":js:js.frontend"))
testCompile(project(":js:js.translator"))
testCompile(project(":native:frontend.native"))
testCompileOnly(project(":plugins:android-extensions-compiler"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":compiler:tests-common-jvm6"))
testCompile(project(":kotlin-scripting-compiler-impl"))
testCompile(commonDep("junit:junit"))
testCompile(androidDxJar()) { isTransitive = false }
testCompile(commonDep("com.android.tools:r8"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompileOnly(toolsJar())
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
Platform[193].orLower {
testCompile(intellijDep()) { includeJars("openapi", "picocontainer", rootProject = rootProject) }
}
Platform[201].orHigher {
testCompile(intellijDep()) {
includeJars(
"testFramework",
"testFramework.core",
rootProject = rootProject
)
}
}
testCompile(intellijDep()) {
includeJars(
"jps-model",
"extensions",
"util",
"platform-api",
"platform-impl",
"idea",
"idea_rt",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
"bootstrap",
rootProject = rootProject
)
isTransitive = false
}
Platform[192].orHigher {
testCompile(intellijDep()) { includeJars("platform-util-ui", "platform-concurrency", "platform-objectSerializer") }
}
Platform[193].orHigher {
testCompile(intellijDep()) { includeJars("platform-ide-util-io") }
}
if (Platform.P202.orHigher()) {
testCompile(intellijDep()) {
includeJars("intellij-deps-fastutil-8.3.1-1")
isTransitive = false
}
}
}
sourceSets {
"main" { }
"test" { projectDefault() }
}
testsJar {}
+1 -3
View File
@@ -13,9 +13,7 @@ dependencies {
testRuntime(project(":kotlin-reflect"))
testRuntimeOnly(toolsJar())
testRuntime(intellijDep())
Platform[192].orHigher {
testRuntimeOnly(intellijPluginDep("java"))
}
testRuntimeOnly(intellijPluginDep("java"))
if (System.getProperty("idea.active") != null) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
}
+7 -9
View File
@@ -5,16 +5,14 @@ plugins {
dependencies {
testCompile(projectTests(":compiler"))
Platform[192].orHigher {
testCompileOnly(intellijDep()) {
includeJars("groovy-all", rootProject = rootProject)
}
testCompile(intellijDep()) {
includeJars("gson", rootProject = rootProject)
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijPluginDep("java"))
testCompileOnly(intellijDep()) {
includeJars("groovy-all", rootProject = rootProject)
}
testCompile(intellijDep()) {
includeJars("gson", rootProject = rootProject)
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijPluginDep("java"))
compile("org.jsoup:jsoup:1.10.3")
if (System.getProperty("idea.active") != null) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
testRuntime(project(":kotlin-reflect"))