[Commonizer] Capitalize messages to be printed at console
This commit is contained in:
+10
-10
@@ -62,17 +62,17 @@ class NativeDistributionCommonizer(
|
|||||||
|
|
||||||
private fun checkPreconditions() {
|
private fun checkPreconditions() {
|
||||||
if (!repository.isDirectory)
|
if (!repository.isDirectory)
|
||||||
logger.fatal("repository does not exist: $repository")
|
logger.fatal("Repository does not exist: $repository")
|
||||||
|
|
||||||
when (targets.size) {
|
when (targets.size) {
|
||||||
0 -> logger.fatal("no targets specified")
|
0 -> logger.fatal("No targets specified")
|
||||||
1 -> logger.fatal("too few targets specified: $targets")
|
1 -> logger.fatal("Too few targets specified: $targets")
|
||||||
}
|
}
|
||||||
|
|
||||||
when {
|
when {
|
||||||
!destination.exists() -> destination.mkdirs()
|
!destination.exists() -> destination.mkdirs()
|
||||||
!destination.isDirectory -> logger.fatal("output already exists: $destination")
|
!destination.isDirectory -> logger.fatal("Output already exists: $destination")
|
||||||
destination.walkTopDown().any { it != destination } -> logger.fatal("output is not empty: $destination")
|
destination.walkTopDown().any { it != destination } -> logger.fatal("Output is not empty: $destination")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ class NativeDistributionCommonizer(
|
|||||||
.orEmpty()
|
.orEmpty()
|
||||||
|
|
||||||
if (platformLibs.isEmpty())
|
if (platformLibs.isEmpty())
|
||||||
logger.warning("no platform libraries found for target $target, this target will be excluded from commonization")
|
logger.warning("No platform libraries found for target $target. This target will be excluded from commonization.")
|
||||||
|
|
||||||
inputTarget to NativeDistributionLibraries(stdlib, platformLibs)
|
inputTarget to NativeDistributionLibraries(stdlib, platformLibs)
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ class NativeDistributionCommonizer(
|
|||||||
|
|
||||||
private fun loadLibrary(location: File): KotlinLibrary {
|
private fun loadLibrary(location: File): KotlinLibrary {
|
||||||
if (!location.isDirectory)
|
if (!location.isDirectory)
|
||||||
logger.fatal("library not found: $location")
|
logger.fatal("Library not found: $location")
|
||||||
|
|
||||||
val library = resolveSingleFileKlib(
|
val library = resolveSingleFileKlib(
|
||||||
libraryFile = KFile(location.path),
|
libraryFile = KFile(location.path),
|
||||||
@@ -108,14 +108,14 @@ class NativeDistributionCommonizer(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (library.versions.metadataVersion == null)
|
if (library.versions.metadataVersion == null)
|
||||||
logger.fatal("library does not have metadata version specified in manifest: $location")
|
logger.fatal("Library does not have metadata version specified in manifest: $location")
|
||||||
|
|
||||||
val metadataVersion = library.metadataVersion
|
val metadataVersion = library.metadataVersion
|
||||||
if (metadataVersion?.isCompatible() != true)
|
if (metadataVersion?.isCompatible() != true)
|
||||||
logger.fatal(
|
logger.fatal(
|
||||||
"""
|
"""
|
||||||
library has incompatible metadata version ${metadataVersion ?: "\"unknown\""}: $location,
|
Library has incompatible metadata version ${metadataVersion ?: "\"unknown\""}: $location
|
||||||
please make sure that all libraries passed to commonizer compatible metadata version ${KlibMetadataVersion.INSTANCE}
|
Please make sure that all libraries passed to commonizer compatible metadata version ${KlibMetadataVersion.INSTANCE}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user