[Native][tests] Use convention fun generatedTestDir() in build.gradle.kts

This commit is contained in:
Dmitriy Dolovov
2023-07-12 16:44:38 +02:00
committed by Space Team
parent 938146749d
commit ce815968cf
2 changed files with 2 additions and 11 deletions
@@ -77,7 +77,7 @@ abstract class AbstractJsPartialLinkageTestCase(private val compilerType: Compil
fun runTest(@TestDataFile testPath: String) = PartialLinkageTestUtils.runTest(JsTestConfiguration(testPath))
private fun customizeMainModuleSources(moduleSourceDir: File) {
// Add @JsExport annotation to make box function be visible for Node.
// Add the @JsExport annotation to make the box function visible to Node.
moduleSourceDir.walkTopDown().forEach { file ->
if (file.extension == "kt") {
var modified = false
+1 -10
View File
@@ -28,20 +28,11 @@ dependencies {
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil"))
}
val generationRoot = projectDir.resolve("tests-gen")
sourceSets {
"main" { none() }
"test" {
projectDefault()
java.srcDirs(generationRoot.name)
}
}
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
apply(plugin = "idea")
idea {
module.generatedSourceDirs.addAll(listOf(generationRoot))
generatedTestDir()
}
}