[Native][tests] Use convention fun generatedTestDir() in build.gradle.kts
This commit is contained in:
committed by
Space Team
parent
938146749d
commit
ce815968cf
+1
-1
@@ -77,7 +77,7 @@ abstract class AbstractJsPartialLinkageTestCase(private val compilerType: Compil
|
|||||||
fun runTest(@TestDataFile testPath: String) = PartialLinkageTestUtils.runTest(JsTestConfiguration(testPath))
|
fun runTest(@TestDataFile testPath: String) = PartialLinkageTestUtils.runTest(JsTestConfiguration(testPath))
|
||||||
|
|
||||||
private fun customizeMainModuleSources(moduleSourceDir: File) {
|
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 ->
|
moduleSourceDir.walkTopDown().forEach { file ->
|
||||||
if (file.extension == "kt") {
|
if (file.extension == "kt") {
|
||||||
var modified = false
|
var modified = false
|
||||||
|
|||||||
@@ -28,20 +28,11 @@ dependencies {
|
|||||||
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil"))
|
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil"))
|
||||||
}
|
}
|
||||||
|
|
||||||
val generationRoot = projectDir.resolve("tests-gen")
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
"main" { none() }
|
"main" { none() }
|
||||||
"test" {
|
"test" {
|
||||||
projectDefault()
|
projectDefault()
|
||||||
java.srcDirs(generationRoot.name)
|
generatedTestDir()
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|
||||||
apply(plugin = "idea")
|
|
||||||
idea {
|
|
||||||
module.generatedSourceDirs.addAll(listOf(generationRoot))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user