JS: rename -source-map-source-roots to -source-map-base-dirs

See KT-19906
This commit is contained in:
Alexey Andreev
2017-09-27 15:43:04 +03:00
parent b3fe572447
commit 21e91c4052
8 changed files with 12 additions and 12 deletions
@@ -48,11 +48,12 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
var sourceMapPrefix: String? by FreezableVar(null)
@Argument(
value = "-source-map-source-roots",
value = "-source-map-base-dirs",
deprecatedName = "-source-map-source-roots",
valueDescription = "<path>",
description = "Base directories which are used to calculate relative paths to source files in source map"
)
var sourceMapSourceRoots: String? by FreezableVar(null)
var sourceMapBaseDirs: String? by FreezableVar(null)
@GradleOption(DefaultValues.JsSourceMapContentModes::class)
@Argument(
@@ -357,8 +357,8 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
configuration.put(JSConfigurationKeys.SOURCE_MAP_PREFIX, arguments.getSourceMapPrefix());
}
String sourceMapSourceRoots = arguments.getSourceMapSourceRoots() != null ?
arguments.getSourceMapSourceRoots() :
String sourceMapSourceRoots = arguments.getSourceMapBaseDirs() != null ?
arguments.getSourceMapBaseDirs() :
calculateSourceMapSourceRoot(messageCollector, arguments);
List<String> sourceMapSourceRootList = StringUtil.split(sourceMapSourceRoots, File.pathSeparator);
configuration.put(JSConfigurationKeys.SOURCE_MAP_SOURCE_ROOTS, sourceMapSourceRootList);
@@ -367,7 +367,7 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
if (arguments.getSourceMapPrefix() != null) {
messageCollector.report(WARNING, "source-map-prefix argument has no effect without source map", null);
}
if (arguments.getSourceMapSourceRoots() != null) {
if (arguments.getSourceMapBaseDirs() != null) {
messageCollector.report(WARNING, "source-map-source-root argument has no effect without source map", null);
}
}