[JS IR] Support additional repositories in CLI (cli part)

This commit is contained in:
Roman Artemev
2020-11-24 11:20:26 +03:00
parent cd9e341fa9
commit 2daf0cc11c
3 changed files with 10 additions and 0 deletions
@@ -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()
+1
View File
@@ -21,6 +21,7 @@ where advanced options include:
-Xir-property-lazy-initialization
Perform lazy initialization for properties
-Xmetadata-only Generate *.meta.js and *.kjsm files only
-Xrepositories=<path> Paths to additional places where libraries could be found
-Xtyped-arrays Translate primitive arrays to JS typed arrays
-Xwasm Use experimental WebAssembly compiler backend
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info