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
+6 -10
View File
@@ -19,14 +19,6 @@ dependencies {
testRuntimeOnly(libs.junit.jupiter.engine)
}
sourceSets {
"main" {
projectDefault()
generatedDir()
}
"test" { projectDefault() }
}
testsJar()
projectTest(jUnitMode = JUnitMode.JUnit5) {
@@ -60,8 +52,12 @@ val generateTree by tasks.registering(NoDebugJavaExec::class) {
systemProperties["line.separator"] = "\n"
}
tasks.named("compileKotlin") {
dependsOn(generateTree)
sourceSets {
"main" {
projectDefault()
java.srcDir(generateTree)
}
"test" { projectDefault() }
}
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {