[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)
|
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)
|
@GradleOption(DefaultValues.BooleanFalseDefault::class)
|
||||||
@Argument(value = "-source-map", description = "Generate source map")
|
@Argument(value = "-source-map", description = "Generate source map")
|
||||||
var sourceMap: Boolean by FreezableVar(false)
|
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 libraries: List<String> = configureLibraries(arguments.libraries) + listOfNotNull(arguments.includes)
|
||||||
val friendLibraries: List<String> = configureLibraries(arguments.friendModules)
|
val friendLibraries: List<String> = configureLibraries(arguments.friendModules)
|
||||||
|
val repositories: List<String> = configureLibraries(arguments.repositries)
|
||||||
|
|
||||||
configuration.put(JSConfigurationKeys.LIBRARIES, libraries)
|
configuration.put(JSConfigurationKeys.LIBRARIES, libraries)
|
||||||
configuration.put(JSConfigurationKeys.TRANSITIVE_LIBRARIES, libraries)
|
configuration.put(JSConfigurationKeys.TRANSITIVE_LIBRARIES, libraries)
|
||||||
|
configuration.put(JSConfigurationKeys.REPOSITORIES, repositories)
|
||||||
|
|
||||||
val commonSourcesArray = arguments.commonSources
|
val commonSourcesArray = arguments.commonSources
|
||||||
val commonSources = commonSourcesArray?.toSet() ?: emptySet()
|
val commonSources = commonSourcesArray?.toSet() ?: emptySet()
|
||||||
|
|||||||
+1
@@ -21,6 +21,7 @@ where advanced options include:
|
|||||||
-Xir-property-lazy-initialization
|
-Xir-property-lazy-initialization
|
||||||
Perform lazy initialization for properties
|
Perform lazy initialization for properties
|
||||||
-Xmetadata-only Generate *.meta.js and *.kjsm files only
|
-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
|
-Xtyped-arrays Translate primitive arrays to JS typed arrays
|
||||||
-Xwasm Use experimental WebAssembly compiler backend
|
-Xwasm Use experimental WebAssembly compiler backend
|
||||||
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
|
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
|
||||||
|
|||||||
Reference in New Issue
Block a user