Prefer data from facet settings when computing module js output root

#KT-26872 Fixed
This commit is contained in:
Pavel V. Talanov
2018-09-27 15:37:03 +02:00
parent 2441df820b
commit ce9028e367
2 changed files with 12 additions and 12 deletions
@@ -27,9 +27,9 @@ import org.jetbrains.plugins.gradle.settings.GradleSystemRunningSettings
val Module.jsTestOutputFilePath: String? val Module.jsTestOutputFilePath: String?
get() { get() {
if (!shouldUseJpsOutput) { KotlinFacet.get(this)?.configuration?.settings?.testOutputPath?.let { return it }
(KotlinFacet.get(this)?.configuration?.settings?.testOutputPath)?.let { return it }
} if (!shouldUseJpsOutput) return null
val compilerExtension = CompilerModuleExtension.getInstance(this) val compilerExtension = CompilerModuleExtension.getInstance(this)
val outputDir = compilerExtension?.compilerOutputUrlForTests ?: return null val outputDir = compilerExtension?.compilerOutputUrlForTests ?: return null
@@ -38,9 +38,9 @@ val Module.jsTestOutputFilePath: String?
val Module.jsProductionOutputFilePath: String? val Module.jsProductionOutputFilePath: String?
get() { get() {
if (!shouldUseJpsOutput) { KotlinFacet.get(this)?.configuration?.settings?.productionOutputPath?.let { return it }
(KotlinFacet.get(this)?.configuration?.settings?.productionOutputPath)?.let { return it }
} if (!shouldUseJpsOutput) return null
val compilerExtension = CompilerModuleExtension.getInstance(this) val compilerExtension = CompilerModuleExtension.getInstance(this)
val outputDir = compilerExtension?.compilerOutputUrl ?: return null val outputDir = compilerExtension?.compilerOutputUrl ?: return null
@@ -29,9 +29,9 @@ import org.jetbrains.plugins.gradle.settings.GradleSystemRunningSettings
val Module.jsTestOutputFilePath: String? val Module.jsTestOutputFilePath: String?
get() { get() {
if (!shouldUseJpsOutput) { KotlinFacet.get(this)?.configuration?.settings?.testOutputPath?.let { return it }
(KotlinFacet.get(this)?.configuration?.settings?.testOutputPath)?.let { return it }
} if (!shouldUseJpsOutput) return null
val compilerExtension = CompilerModuleExtension.getInstance(this) val compilerExtension = CompilerModuleExtension.getInstance(this)
val outputDir = compilerExtension?.compilerOutputUrlForTests ?: return null val outputDir = compilerExtension?.compilerOutputUrlForTests ?: return null
@@ -40,9 +40,9 @@ val Module.jsTestOutputFilePath: String?
val Module.jsProductionOutputFilePath: String? val Module.jsProductionOutputFilePath: String?
get() { get() {
if (!shouldUseJpsOutput) { KotlinFacet.get(this)?.configuration?.settings?.productionOutputPath?.let { return it }
(KotlinFacet.get(this)?.configuration?.settings?.productionOutputPath)?.let { return it }
} if (!shouldUseJpsOutput) return null
val compilerExtension = CompilerModuleExtension.getInstance(this) val compilerExtension = CompilerModuleExtension.getInstance(this)
val outputDir = compilerExtension?.compilerOutputUrl ?: return null val outputDir = compilerExtension?.compilerOutputUrl ?: return null