Gradle: Import test output path for JavaScript modules
Original commit: 3319fdba6d
This commit is contained in:
@@ -151,6 +151,8 @@ class KotlinFacetSettings {
|
||||
}
|
||||
|
||||
var implementedModuleName: String? = null
|
||||
|
||||
var testOutputPath: String? = null
|
||||
}
|
||||
|
||||
fun TargetPlatformKind<*>.createCompilerArguments(init: CommonCompilerArguments.() -> Unit = {}): CommonCompilerArguments {
|
||||
|
||||
@@ -108,6 +108,9 @@ private fun readV2AndLaterConfig(element: Element): KotlinFacetSettings {
|
||||
compilerArguments = platformKind.createCompilerArguments()
|
||||
XmlSerializer.deserializeInto(compilerArguments!!, it)
|
||||
}
|
||||
testOutputPath = element.getChild("testOutputPath")?.let {
|
||||
PathUtil.toSystemDependentName((it.content.firstOrNull() as? Text)?.textTrim)
|
||||
} ?: (compilerArguments as? K2JSCompilerArguments)?.outputFile
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,6 +235,11 @@ private fun KotlinFacetSettings.writeLatestConfig(element: Element) {
|
||||
implementedModuleName?.let {
|
||||
element.addContent(Element("implements").apply { addContent(it) })
|
||||
}
|
||||
testOutputPath?.let {
|
||||
if (it != (compilerArguments as? K2JSCompilerArguments)?.outputFile) {
|
||||
element.addContent(Element("testOutputPath").apply { addContent(PathUtil.toSystemIndependentName(it)) })
|
||||
}
|
||||
}
|
||||
compilerSettings?.let { copyBean(it) }?.let {
|
||||
it.convertPathsToSystemIndependent()
|
||||
buildChildElement(element, "compilerSettings", it, filter)
|
||||
|
||||
Reference in New Issue
Block a user