[Commonizer] DependencyLibrariesOptionType: Make option optional (default: empty)
This commit is contained in:
committed by
Space
parent
73222fbc4f
commit
d03a85525d
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
package org.jetbrains.kotlin.descriptors.commonizer.cli
|
package org.jetbrains.kotlin.descriptors.commonizer.cli
|
||||||
|
|
||||||
internal object DependencyLibrariesOptionType : LibrariesSetOptionType(
|
internal object DependencyLibrariesOptionType : LibrariesSetOptionType(
|
||||||
mandatory = true,
|
mandatory = false,
|
||||||
alias = "dependency-libraries",
|
alias = "dependency-libraries",
|
||||||
description = "';' separated list of klib file paths that can be used as dependency"
|
description = "';' separated list of klib file paths that can be used as dependency"
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@ internal class NativeKlibCommonize(options: Collection<Option<*>>) : Task(option
|
|||||||
val distribution = KonanDistribution(getMandatory<File, NativeDistributionOptionType>())
|
val distribution = KonanDistribution(getMandatory<File, NativeDistributionOptionType>())
|
||||||
val destination = getMandatory<File, OutputOptionType>()
|
val destination = getMandatory<File, OutputOptionType>()
|
||||||
val targetLibraries = getMandatory<List<File>, InputLibrariesOptionType>()
|
val targetLibraries = getMandatory<List<File>, InputLibrariesOptionType>()
|
||||||
val dependencyLibraries = getMandatory<List<File>, DependencyLibrariesOptionType>()
|
val dependencyLibraries = getOptional<List<File>, DependencyLibrariesOptionType>().orEmpty()
|
||||||
val outputCommonizerTarget = getMandatory<SharedCommonizerTarget, OutputCommonizerTargetOptionType>()
|
val outputCommonizerTarget = getMandatory<SharedCommonizerTarget, OutputCommonizerTargetOptionType>()
|
||||||
val statsType = getOptional<StatsType, StatsTypeOptionType> { it == "log-stats" } ?: StatsType.NONE
|
val statsType = getOptional<StatsType, StatsTypeOptionType> { it == "log-stats" } ?: StatsType.NONE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user