Files
kotlin-fork/compiler/build.gradle.kts
T
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00

72 lines
2.3 KiB
Kotlin

import java.io.File
plugins {
kotlin("jvm")
id("jps-compatible")
}
val compilerModules: Array<String> by rootProject.extra
val otherCompilerModules = compilerModules.filter { it != path }
val antLauncherJar by configurations.creating
dependencies {
testImplementation(intellijCore()) // Should come before compiler, because of "progarded" stuff needed for tests
testApi(project(":kotlin-script-runtime"))
testApi(project(":kotlin-test:kotlin-test-jvm"))
testApi(kotlinStdlib())
testApi(commonDependency("junit:junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:fir:raw-fir:psi2fir"))
testApi(projectTests(":compiler:fir:raw-fir:light-tree2fir"))
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testApi(projectTests(":generators:test-generator"))
testApi(project(":compiler:ir.ir2cfg"))
testApi(project(":compiler:ir.tree")) // used for deepCopyWithSymbols call that is removed by proguard from the compiler TODO: make it more straightforward
testApi(project(":kotlin-scripting-compiler"))
testApi(project(":kotlin-script-util"))
otherCompilerModules.forEach {
testCompileOnly(project(it))
}
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(toolsJar())
antLauncherJar(commonDependency("org.apache.ant", "ant"))
antLauncherJar(toolsJar())
}
optInToExperimentalCompilerApi()
sourceSets {
"main" {}
"test" {
projectDefault()
generatedTestDir()
}
}
projectTest(parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
val antLauncherJarPathProvider = project.provider {
antLauncherJar.asPath
}
doFirst {
systemProperty("kotlin.ant.classpath", antLauncherJarPathProvider.get())
systemProperty("kotlin.ant.launcher.class", "org.apache.tools.ant.Main")
}
}
val generateTestData by generator("org.jetbrains.kotlin.generators.tests.GenerateCompilerTestDataKt")
testsJar()