Remove 202 platform support in build scripts

This commit is contained in:
Nikolay Krasko
2021-07-21 20:36:49 +03:00
committed by TeamCityServer
parent ec99585eb9
commit 83023c2073
10 changed files with 14 additions and 63 deletions

View File

@@ -161,11 +161,7 @@ extra["intellijSeparateSdks"] = intellijSeparateSdks
extra["IntellijCoreDependencies"] = extra["IntellijCoreDependencies"] =
listOf( listOf(
when { "asm-all-9.0",
Platform[203].orHigher() -> "asm-all-9.0"
Platform[202].orHigher() -> "asm-all-8.0.1"
else -> "asm-all-7.0.1"
},
"guava", "guava",
"jdom", "jdom",
"jna", "jna",

View File

@@ -26,7 +26,7 @@ fun CompatibilityPredicate.or(other: CompatibilityPredicate): CompatibilityPredi
} }
enum class Platform : CompatibilityPredicate { enum class Platform : CompatibilityPredicate {
P202, P203; P203;
val version: Int = name.drop(1).toInt() val version: Int = name.drop(1).toInt()
@@ -43,10 +43,7 @@ enum class Platform : CompatibilityPredicate {
} }
enum class Ide(val platform: Platform) : CompatibilityPredicate { enum class Ide(val platform: Platform) : CompatibilityPredicate {
IJ202(Platform.P202), IJ203(Platform.P203);
IJ203(Platform.P203),
AS42(Platform.P202);
val kind = Kind.values().first { it.shortName == name.take(2) } val kind = Kind.values().first { it.shortName == name.take(2) }
val version = name.dropWhile { !it.isDigit() }.toInt() val version = name.dropWhile { !it.isDigit() }.toInt()

View File

@@ -36,12 +36,7 @@ dependencies {
includeJars("jna", rootProject = rootProject) includeJars("jna", rootProject = rootProject)
} }
Platform[202] { testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-1") }
}
Platform[203].orHigher {
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
}
testRuntimeOnly(toolsJar()) testRuntimeOnly(toolsJar())
} }

View File

@@ -43,12 +43,7 @@ dependencies {
includeJars("jna", rootProject = rootProject) includeJars("jna", rootProject = rootProject)
} }
Platform[202] { testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-1") }
}
Platform[203].orHigher {
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
}
} }
val generationRoot = projectDir.resolve("tests-gen") val generationRoot = projectDir.resolve("tests-gen")

View File

@@ -28,12 +28,7 @@ dependencies {
includeJars("jna", rootProject = rootProject) includeJars("jna", rootProject = rootProject)
} }
Platform[202] { testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-1") }
}
Platform[203].orHigher {
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
}
testRuntimeOnly(toolsJar()) testRuntimeOnly(toolsJar())
} }

View File

@@ -57,12 +57,7 @@ dependencies {
testCompileOnly(project(":kotlin-reflect-api")) testCompileOnly(project(":kotlin-reflect-api"))
testCompileOnly(toolsJar()) testCompileOnly(toolsJar())
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
Platform[202] { testCompile(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
testCompile(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-1") }
}
Platform[203].orHigher {
testCompile(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
}
testCompile(intellijDep()) { testCompile(intellijDep()) {
includeJars( includeJars(
"guava", "guava",

View File

@@ -19,12 +19,7 @@ dependencies {
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests")) testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testImplementation(projectTests(":generators:test-generator")) testImplementation(projectTests(":generators:test-generator"))
Platform[202] { testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-1") }
}
Platform[203].orHigher {
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
}
testRuntimeOnly(compile(intellijDep()) { includeJars("jna", rootProject = rootProject) }) testRuntimeOnly(compile(intellijDep()) { includeJars("jna", rootProject = rootProject) })
} }

View File

@@ -20,18 +20,11 @@ fun Project.configureJavaInstrumentation() {
if (plugins.hasPlugin("org.gradle.java")) { if (plugins.hasPlugin("org.gradle.java")) {
val javaInstrumentator by configurations.creating val javaInstrumentator by configurations.creating
dependencies { dependencies {
Platform[202] { javaInstrumentator(intellijDep()) {
javaInstrumentator(intellijDep()) { includeJars("jdom", "asm-all", rootProject = rootProject)
includeJars("javac2", "jdom", "asm-all", rootProject = rootProject)
}
} }
Platform[203].orHigher { javaInstrumentator(intellijPluginDep("java")) {
javaInstrumentator(intellijDep()) { includeJars("javac2", rootProject = rootProject)
includeJars("jdom", "asm-all", rootProject = rootProject)
}
javaInstrumentator(intellijPluginDep("java")) {
includeJars("javac2", rootProject = rootProject)
}
} }
} }
for (sourceSet in listOf(mainSourceSet, testSourceSet)) { for (sourceSet in listOf(mainSourceSet, testSourceSet)) {

View File

@@ -20,12 +20,7 @@ dependencies {
includeJars("idea", "idea_rt", "log4j", "guava", "jdom", rootProject = rootProject) includeJars("idea", "idea_rt", "log4j", "guava", "jdom", rootProject = rootProject)
} }
testRuntimeOnly(commonDep("org.jetbrains.intellij.deps", "trove4j")) testRuntimeOnly(commonDep("org.jetbrains.intellij.deps", "trove4j"))
Platform[202] { testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-1") }
}
Platform[203].orHigher {
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
}
} }
sourceSets { sourceSets {

View File

@@ -207,12 +207,7 @@ dependencies {
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") } fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
fatJarContents(intellijDep()) { includeJars("jna-platform") } fatJarContents(intellijDep()) { includeJars("jna-platform") }
Platform[202] { fatJarContents(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
fatJarContents(intellijDep()) { includeJars("intellij-deps-fastutil-8.3.1-1") }
}
Platform[203].orHigher {
fatJarContents(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
}
fatJarContents(intellijDep()) { includeJars("lz4-java", rootProject = rootProject) } fatJarContents(intellijDep()) { includeJars("lz4-java", rootProject = rootProject) }