fb8bf19091
The new name more precisely describes the meaning of this opt-int
73 lines
1.7 KiB
Kotlin
73 lines
1.7 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())
|
|
}
|
|
|
|
optInToUnsafeDuringIrConstructionAPI()
|
|
|
|
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
|
|
mainClass.set("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)
|
|
}
|
|
}
|