Create separate source set for interpreter map generator

A separate source set is needed so that the generator no longer depends
on the generated code
This commit is contained in:
Ivan Kylchik
2020-06-24 18:09:53 +03:00
parent 643d339496
commit 895c32e21c
4 changed files with 57 additions and 66 deletions
+4 -2
View File
@@ -23,6 +23,7 @@ fun extraSourceSet(name: String, extendMain: Boolean = true): Pair<SourceSet, Co
val (builtinsSourceSet, builtinsApi) = extraSourceSet("builtins", extendMain = false)
val (evaluateSourceSet, evaluateApi) = extraSourceSet("evaluate")
val (interpreterSourceSet, interpreterApi) = extraSourceSet("interpreter")
dependencies {
// for GeneratorsFileUtil
@@ -31,11 +32,11 @@ dependencies {
builtinsApi("org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion") { isTransitive = false }
evaluateApi(project(":core:deserialization"))
evaluateApi(project(":compiler:ir.tree"))
evaluateApi(project(":compiler:ir.backend.common"))
interpreterApi(project(":compiler:ir.tree"))
testCompile(builtinsSourceSet.output)
testCompile(evaluateSourceSet.output)
testCompile(interpreterSourceSet.output)
testCompile(projectTests(":compiler:cli"))
testCompile(projectTests(":idea:idea-maven"))
@@ -90,5 +91,6 @@ val generateKeywordStrings by generator("org.jetbrains.kotlin.generators.fronten
val generateBuiltins by generator("org.jetbrains.kotlin.generators.builtins.generateBuiltIns.GenerateBuiltInsKt", builtinsSourceSet)
val generateOperationsMap by generator("org.jetbrains.kotlin.generators.evaluate.GenerateOperationsMapKt", evaluateSourceSet)
val generateInterpreterMap by generator("org.jetbrains.kotlin.generators.interpreter.GenerateInterpreterMapKt", interpreterSourceSet)
testsJar()