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"] =
listOf(
when {
Platform[203].orHigher() -> "asm-all-9.0"
Platform[202].orHigher() -> "asm-all-8.0.1"
else -> "asm-all-7.0.1"
},
"asm-all-9.0",
"guava",
"jdom",
"jna",

View File

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

View File

@@ -36,12 +36,7 @@ dependencies {
includeJars("jna", rootProject = rootProject)
}
Platform[202] {
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())
}

View File

@@ -43,12 +43,7 @@ dependencies {
includeJars("jna", rootProject = rootProject)
}
Platform[202] {
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")

View File

@@ -28,12 +28,7 @@ dependencies {
includeJars("jna", rootProject = rootProject)
}
Platform[202] {
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())
}

View File

@@ -57,12 +57,7 @@ dependencies {
testCompileOnly(project(":kotlin-reflect-api"))
testCompileOnly(toolsJar())
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
Platform[202] {
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()) {
includeJars(
"guava",

View File

@@ -19,12 +19,7 @@ dependencies {
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testImplementation(projectTests(":generators:test-generator"))
Platform[202] {
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) })
}

View File

@@ -20,12 +20,6 @@ fun Project.configureJavaInstrumentation() {
if (plugins.hasPlugin("org.gradle.java")) {
val javaInstrumentator by configurations.creating
dependencies {
Platform[202] {
javaInstrumentator(intellijDep()) {
includeJars("javac2", "jdom", "asm-all", rootProject = rootProject)
}
}
Platform[203].orHigher {
javaInstrumentator(intellijDep()) {
includeJars("jdom", "asm-all", rootProject = rootProject)
}
@@ -33,7 +27,6 @@ fun Project.configureJavaInstrumentation() {
includeJars("javac2", rootProject = rootProject)
}
}
}
for (sourceSet in listOf(mainSourceSet, testSourceSet)) {
tasks.named(sourceSet.compileJavaTaskName, InstrumentJava(javaInstrumentator, sourceSet))
}

View File

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

View File

@@ -207,12 +207,7 @@ dependencies {
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
fatJarContents(intellijDep()) { includeJars("jna-platform") }
Platform[202] {
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) }