a65cb947d6
Review: https://jetbrains.team/p/kt/reviews/6753 After we migrated to the binary reflect in previous commits we want to make sure that people won't accidentaly depend on wrong reflect in the future.
71 lines
1.6 KiB
Kotlin
71 lines
1.6 KiB
Kotlin
import org.jetbrains.kotlin.ideaExt.idea
|
|
|
|
plugins {
|
|
kotlin("jvm")
|
|
id("jps-compatible")
|
|
}
|
|
|
|
dependencies {
|
|
api(project(":core:descriptors"))
|
|
api(project(":core:deserialization"))
|
|
api(project(":compiler:frontend.common"))
|
|
implementation(project(":compiler:util"))
|
|
implementation(project(":compiler:config"))
|
|
|
|
if (kotlinBuildProperties.isInIdeaSync) {
|
|
compileOnly(project("tree-generator")) // Provided, so that IDEA can recognize references to this module in KDoc.
|
|
}
|
|
compileOnly(intellijCore())
|
|
}
|
|
|
|
sourceSets {
|
|
"main" {
|
|
projectDefault()
|
|
generatedDir()
|
|
}
|
|
"test" {}
|
|
}
|
|
|
|
val generatorClasspath by configurations.creating
|
|
|
|
dependencies {
|
|
generatorClasspath(project("tree-generator"))
|
|
}
|
|
|
|
val generationRoot = projectDir.resolve("gen")
|
|
|
|
val generateTree by tasks.registering(NoDebugJavaExec::class) {
|
|
|
|
val generatorRoot = "$projectDir/tree-generator/src/"
|
|
|
|
val generatorConfigurationFiles = fileTree(generatorRoot) {
|
|
include("**/*.kt")
|
|
}
|
|
|
|
inputs.files(generatorConfigurationFiles)
|
|
outputs.dirs(generationRoot)
|
|
|
|
args(generationRoot)
|
|
workingDir = rootDir
|
|
classpath = generatorClasspath
|
|
main = "org.jetbrains.kotlin.ir.generator.MainKt"
|
|
systemProperties["line.separator"] = "\n"
|
|
}
|
|
|
|
val compileKotlin by tasks
|
|
|
|
compileKotlin.dependsOn(generateTree)
|
|
|
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
|
kotlinOptions {
|
|
freeCompilerArgs += "-Xinline-classes"
|
|
}
|
|
}
|
|
|
|
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|
apply(plugin = "idea")
|
|
idea {
|
|
this.module.generatedSourceDirs.add(generationRoot)
|
|
}
|
|
}
|