Skip to content

Commit

Permalink
Update asm: substitute asm from platform to more specific one
Browse files Browse the repository at this point in the history
 #KTIJ-19005 In Progress
  • Loading branch information
goodwinnk authored and Space committed Sep 14, 2021
1 parent 0d9cc9e commit ab3eb55
Show file tree
Hide file tree
Showing 51 changed files with 70 additions and 42 deletions.
1 change: 1 addition & 0 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies {
compile(intellijCoreDep()) { includeJars("intellij-core") }
compile(jpsStandalone()) { includeJars("jps-model") }
compile(intellijPluginDep("java"))
compile("org.jetbrains.intellij.deps:asm-all:9.1")
compile(intellijDep()) { includeIntellijCoreJarDependencies(project) }
compile("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:$benchmarks_version")
}
Expand Down
3 changes: 2 additions & 1 deletion build-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ dependencies {
compileOnly(project(":js:js.config"))
compileOnly(project(":kotlin-util-klib-metadata"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "util", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeJars("trove4j", "util", rootProject = rootProject) }
compileOnly(project(":kotlin-reflect-api"))

testCompileOnly(project(":compiler:cli-common"))
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ extra["intellijSeparateSdks"] = intellijSeparateSdks

extra["IntellijCoreDependencies"] =
listOf(
"asm-all-8.0.1",
"guava",
"jdom",
"jna",
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ dependencies {

implementation("com.github.jengelman.gradle.plugins:shadow:${rootProject.extra["versions.shadow"]}")
implementation("net.sf.proguard:proguard-gradle:6.2.2")
implementation("org.jetbrains.intellij.deps:asm-all:8.0.1")
implementation("org.jetbrains.intellij.deps:asm-all:9.1")

implementation("gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:0.5")

Expand Down
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/instrument.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ fun Project.configureFormInstrumentation() {
val instrumentationClasspathCfg = configurations.create("instrumentationClasspath")

dependencies {
instrumentationClasspathCfg(intellijDep()) { includeJars("javac2", "jdom", "asm-all", rootProject = rootProject) }
instrumentationClasspathCfg("org.jetbrains.intellij.deps:asm-all:9.1")
instrumentationClasspathCfg(intellijDep()) { includeJars("javac2", "jdom", rootProject = rootProject) }
}

afterEvaluate {
Expand Down
3 changes: 2 additions & 1 deletion compiler/backend.common.jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ plugins {
dependencies {
api(project(":core:compiler.common.jvm"))
api(project(":compiler:config.jvm"))
api(intellijCoreDep()) { includeJars("asm-all", "guava", rootProject = rootProject) }
api("org.jetbrains.intellij.deps:asm-all:9.1")
api(intellijCoreDep()) { includeJars("guava", rootProject = rootProject) }
}

sourceSets {
Expand Down
3 changes: 2 additions & 1 deletion compiler/backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ dependencies {
compile(project(":compiler:frontend.java"))
compile(project(":compiler:serialization"))
api(project(":compiler:backend.common.jvm"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", "guava", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
compileOnly(intellijDep()) { includeJars("trove4j", rootProject = rootProject) }
}

Expand Down
3 changes: 2 additions & 1 deletion compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ dependencies {
testCompileOnly(project(it))
}
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "util", "asm-all", rootProject = rootProject) }
testCompileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "util", rootProject = rootProject) }

testRuntimeOnly(intellijPluginDep("java"))

Expand Down
1 change: 1 addition & 0 deletions compiler/cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies {

compileOnly(toolsJarApi())
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }

testCompile(project(":compiler:backend"))
Expand Down
1 change: 1 addition & 0 deletions compiler/cli/cli-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies {
compile(project(":native:kotlin-native-utils"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/config.jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
dependencies {
api(project(":compiler:config"))
api(project(":core:descriptors.jvm"))
compileOnly(intellijCoreDep()) { includeJars("asm-all", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
}

sourceSets {
Expand Down
1 change: 1 addition & 0 deletions compiler/daemon/daemon-client-new/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {
compileOnly(project(":js:js.frontend"))
compileOnly(project(":daemon-common")) { isTransitive = false }
compileOnly(commonDep("net.rubygrapefruit", "native-platform"))
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }

embedded(project(":kotlin-daemon-client")) { isTransitive = false }
Expand Down
1 change: 1 addition & 0 deletions compiler/daemon/daemon-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies {
compileOnly(project(":kotlin-reflect-api"))
compileOnly(project(":js:js.frontend"))
compileOnly(commonDep("net.rubygrapefruit", "native-platform"))
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }

embedded(project(":daemon-common")) { isTransitive = false }
Expand Down
1 change: 1 addition & 0 deletions compiler/daemon/daemon-common-new/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies {
compileOnly(project(":daemon-common"))
compile(kotlinStdlib())
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) {
isTransitive = false
Expand Down
1 change: 1 addition & 0 deletions compiler/daemon/daemon-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies {
compile(kotlinStdlib())
compileOnly(project(":js:js.config"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }
compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) {
isTransitive = false
Expand Down
2 changes: 1 addition & 1 deletion compiler/fir/analysis-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies {
testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend"))

testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly("org.jetbrains.intellij.deps:asm-all:9.1")
testRuntimeOnly(intellijDep()) {
includeJars(
"jps-model",
Expand All @@ -42,7 +43,6 @@ dependencies {
"idea",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
Expand Down
2 changes: 1 addition & 1 deletion compiler/fir/fir2ir/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }

testRuntimeOnly("org.jetbrains.intellij.deps:asm-all:9.1")
testRuntimeOnly(intellijDep()) {
includeJars(
"jps-model",
Expand All @@ -46,7 +47,6 @@ dependencies {
"idea",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
Expand Down
3 changes: 2 additions & 1 deletion compiler/fir/fir2ir/jvm-backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ dependencies {
compileOnly(project(":compiler:backend.jvm"))
api(project(":compiler:ir.serialization.common"))

compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) }
}

sourceSets {
Expand Down
3 changes: 2 additions & 1 deletion compiler/fir/modularized-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ repositories {
}

dependencies {
testCompileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
testCompileOnly(intellijDep()) {
includeJars("extensions", "idea_rt", "util", "asm-all", "platform-util-ex", "jna", rootProject = rootProject)
includeJars("extensions", "idea_rt", "util", "platform-util-ex", "jna", rootProject = rootProject)
}

testCompileOnly(intellijPluginDep("java")) { includeJars("java-api") }
Expand Down
3 changes: 2 additions & 1 deletion compiler/frontend.java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ dependencies {
compile(project(":compiler:frontend"))
api(project(":compiler:resolution.common.jvm"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "guava", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeJars("trove4j", "guava", rootProject = rootProject) }
}

sourceSets {
Expand Down
3 changes: 2 additions & 1 deletion compiler/ir/backend.jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ dependencies {
compile(project(":compiler:ir.backend.common"))
api(project(":compiler:backend.common.jvm"))
compileOnly(project(":compiler:ir.tree.impl"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", "guava", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
compileOnly(intellijDep()) { includeJars("trove4j", rootProject = rootProject) }
}

Expand Down
1 change: 1 addition & 0 deletions compiler/javac-wrapper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies {

compileOnly(toolsJarApi())
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }
}

Expand Down
3 changes: 2 additions & 1 deletion compiler/light-classes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ dependencies {

compileOnly(intellijDep()) { includeJars("platform-core-ui", "platform-util-ui") }

compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "guava", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeJars("trove4j", "guava", rootProject = rootProject) }
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion compiler/preloader/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

dependencies {
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
}

sourceSets {
Expand Down
3 changes: 2 additions & 1 deletion compiler/resolution.common.jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ dependencies {
implementation(project(":compiler:util"))
implementation(commonDep("io.javaslang","javaslang"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "guava", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeJars("trove4j", "guava", rootProject = rootProject) }
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion compiler/tests-common-new/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies {
testApi(projectTests(":compiler:tests-compiler-utils"))
testApi(projectTests(":compiler:tests-common-jvm6"))

testRuntimeOnly("org.jetbrains.intellij.deps:asm-all:9.1")
testRuntimeOnly(intellijDep()) {
includeJars(
"jps-model",
Expand All @@ -34,7 +35,6 @@ dependencies {
"idea",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
Expand Down
2 changes: 1 addition & 1 deletion compiler/tests-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ dependencies {
Platform[203].orHigher {
testCompile(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-3") }
}
testCompile("org.jetbrains.intellij.deps:asm-all:9.1")
testCompile(intellijDep()) {
includeJars(
"jps-model",
Expand All @@ -81,7 +82,6 @@ dependencies {
"idea_rt",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
Expand Down
2 changes: 1 addition & 1 deletion compiler/tests-compiler-utils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {
testCompile(commonDep("com.android.tools:r8"))
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }

testCompile("org.jetbrains.intellij.deps:asm-all:9.1")
testCompile(intellijDep()) {
includeJars(
"jps-model",
Expand All @@ -40,7 +41,6 @@ dependencies {
"idea_rt",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
Expand Down
1 change: 1 addition & 0 deletions compiler/util/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies {
api(project(":compiler:compiler.version"))

compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }
compileOnly(jpsStandalone()) { includeJars("jps-model") }
}
Expand Down
3 changes: 2 additions & 1 deletion gradle/javaInstrumentation.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ fun Project.configureJavaInstrumentation() {
if (plugins.hasPlugin("org.gradle.java")) {
val javaInstrumentator by configurations.creating
dependencies {
javaInstrumentator("org.jetbrains.intellij.deps:asm-all:9.1")
javaInstrumentator(intellijDep()) {
includeJars("javac2", "jdom", "asm-all", rootProject = rootProject)
includeJars("javac2", "jdom", rootProject = rootProject)
}
}
for (sourceSet in listOf(mainSourceSet, testSourceSet)) {
Expand Down
2 changes: 1 addition & 1 deletion idea/idea-frontend-fir/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies {
testCompile(toolsJar())
testApiJUnit5()

testRuntimeOnly("org.jetbrains.intellij.deps:asm-all:9.1")
testRuntimeOnly(intellijDep()) {
includeJars(
"jps-model",
Expand All @@ -38,7 +39,6 @@ dependencies {
"idea",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies {
testApiJUnit5()
testCompile(project(":kotlin-reflect"))

testRuntimeOnly("org.jetbrains.intellij.deps:asm-all:9.1")
testRuntimeOnly(intellijDep()) {
includeJars(
"jps-model",
Expand All @@ -43,7 +44,6 @@ dependencies {
"idea",
"guava",
"trove4j",
"asm-all",
"log4j",
"jdom",
"streamex",
Expand Down
5 changes: 3 additions & 2 deletions idea/jvm-debugger/eval4j/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ dependencies {
compile(project(":compiler:backend"))

compileOnly(toolsJarApi())
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) }

testCompileOnly(toolsJarApi())
testCompile(project(":kotlin-test:kotlin-test-junit"))
testCompile(commonDep("junit:junit"))
testCompile(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompile("org.jetbrains.intellij.deps:asm-all:9.1")
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ extra["intellijSeparateSdks"] = intellijSeparateSdks

extra["IntellijCoreDependencies"] =
listOf("annotations",
"asm-all",
"guava",
"jdom",
"jna",
Expand Down
3 changes: 2 additions & 1 deletion jps-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ dependencies {
compile(project(":js:js.frontend"))
compile(projectRuntimeJar(":kotlin-preloader"))
compile(project(":idea:idea-jps-common"))
compileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
compileOnly(intellijDep()) {
includeJars("jdom", "trove4j", "jps-model", "platform-api", "util", "asm-all", rootProject = rootProject)
includeJars("jdom", "trove4j", "jps-model", "platform-api", "util", rootProject = rootProject)
}
compileOnly(jpsStandalone()) { includeJars("jps-builders", "jps-builders-6") }
testCompileOnly(project(":kotlin-reflect-api"))
Expand Down
2 changes: 1 addition & 1 deletion libraries/kotlinx-metadata/jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
shadows(protobufLite())
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(commonDep("junit:junit"))
testImplementation(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testImplementation("org.jetbrains.intellij.deps:asm-all:9.1")
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
// Workaround for missing transitive import of the common(project `kotlin-test-common`
// for `kotlin-test-jvm` into the IDE:
testCompileOnly(project(":kotlin-test:kotlin-test-common")) { isTransitive = false }
testCompileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompileOnly("org.jetbrains.intellij.deps:asm-all:9.1")
}

// Aapt2 from Android Gradle Plugin 3.2 and below does not handle long paths on Windows.
Expand Down
Loading

0 comments on commit ab3eb55

Please sign in to comment.