[FIR] Separate generated tree files from non-generated sources
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import org.jetbrains.kotlin.ideaExt.idea
|
||||
|
||||
/*
|
||||
* Copyright 2000-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
@@ -18,7 +20,10 @@ dependencies {
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"main" {
|
||||
projectDefault()
|
||||
this.java.srcDir("gen")
|
||||
}
|
||||
}
|
||||
|
||||
val generatorClasspath by configurations.creating
|
||||
@@ -27,8 +32,10 @@ dependencies {
|
||||
generatorClasspath(project("tree-generator"))
|
||||
}
|
||||
|
||||
val generationRoot = projectDir.resolve("gen")
|
||||
|
||||
val generateTree by tasks.registering(NoDebugJavaExec::class) {
|
||||
val generationRoot = "$projectDir/src/"
|
||||
|
||||
val generatorRoot = "$projectDir/tree-generator/src/"
|
||||
|
||||
val generatorConfigurationFiles = fileTree(generatorRoot) {
|
||||
@@ -47,3 +54,10 @@ val generateTree by tasks.registering(NoDebugJavaExec::class) {
|
||||
val compileKotlin by tasks
|
||||
|
||||
compileKotlin.dependsOn(generateTree)
|
||||
|
||||
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
||||
apply(plugin = "idea")
|
||||
idea {
|
||||
this.module.generatedSourceDirs.add(generationRoot)
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user