Declare generated SourceSets correctly

Allow Gradle to keep the track of the task generating the sources
KTI-1502 Fixed
This commit is contained in:
cristiangarcia
2023-12-24 00:01:59 +00:00
committed by Space Team
parent 88f7b085e6
commit 5a1fb78fcd
7 changed files with 49 additions and 73 deletions
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
description = "Kotlin Mock Runtime for Tests"
plugins {
@@ -22,15 +20,6 @@ dependencies {
builtins(project(":core:builtins"))
}
sourceSets {
"main" {
java.apply {
srcDir(layout.buildDirectory.dir("src"))
}
}
"test" {}
}
val copySources by task<Sync> {
val stdlibProjectDir = file("$rootDir/libraries/stdlib/jvm")
@@ -53,7 +42,12 @@ val copySources by task<Sync> {
into(layout.buildDirectory.dir("src"))
}
sourceSets {
"main" {
java.srcDir(copySources)
}
"test" {}
}
tasks.compileKotlin {
dependsOn(copySources)