[JS IR] Support additional repositories in CLI (cli part)
This commit is contained in:
+7
@@ -33,6 +33,13 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
|
||||
)
|
||||
var libraries: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@Argument(
|
||||
value = "-Xrepositories",
|
||||
valueDescription = "<path>",
|
||||
description = "Paths to additional places where libraries could be found"
|
||||
)
|
||||
var repositries: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@GradleOption(DefaultValues.BooleanFalseDefault::class)
|
||||
@Argument(value = "-source-map", description = "Generate source map")
|
||||
var sourceMap: Boolean by FreezableVar(false)
|
||||
|
||||
@@ -113,9 +113,11 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
|
||||
val libraries: List<String> = configureLibraries(arguments.libraries) + listOfNotNull(arguments.includes)
|
||||
val friendLibraries: List<String> = configureLibraries(arguments.friendModules)
|
||||
val repositories: List<String> = configureLibraries(arguments.repositries)
|
||||
|
||||
configuration.put(JSConfigurationKeys.LIBRARIES, libraries)
|
||||
configuration.put(JSConfigurationKeys.TRANSITIVE_LIBRARIES, libraries)
|
||||
configuration.put(JSConfigurationKeys.REPOSITORIES, repositories)
|
||||
|
||||
val commonSourcesArray = arguments.commonSources
|
||||
val commonSources = commonSourcesArray?.toSet() ?: emptySet()
|
||||
|
||||
Reference in New Issue
Block a user