[K/N][gradle] Set klib version from gradle
This commit is contained in:
+2
@@ -48,6 +48,8 @@ open class CommonInteropArguments(val argParser: ArgParser) {
|
||||
.multiple().delimiter(",")
|
||||
val library by argParser.option(ArgType.String, shortName = "l", description = "library to use for building")
|
||||
.multiple()
|
||||
val libraryVersion by argParser.option(ArgType.String, shortName = "lv", description = "resulting interop library version")
|
||||
.default("unspecified")
|
||||
val repo by argParser.option(ArgType.String, shortName = "r", description = "repository to resolve dependencies")
|
||||
.multiple()
|
||||
val mode by argParser.option(ArgType.Choice<GenerationMode>(), description = "the way interop library is generated")
|
||||
|
||||
+2
-1
@@ -29,6 +29,7 @@ fun createInteropLibrary(
|
||||
metadata: KlibModuleMetadata,
|
||||
outputPath: String,
|
||||
moduleName: String,
|
||||
libraryVersion: String,
|
||||
nativeBitcodeFiles: List<String>,
|
||||
target: KonanTarget,
|
||||
manifest: Properties,
|
||||
@@ -38,7 +39,7 @@ fun createInteropLibrary(
|
||||
staticLibraries: List<String>
|
||||
) {
|
||||
val version = KotlinLibraryVersioning(
|
||||
libraryVersion = null,
|
||||
libraryVersion = libraryVersion,
|
||||
abiVersion = KotlinAbiVersion.CURRENT,
|
||||
compilerVersion = CompilerVersion.CURRENT.toString(),
|
||||
metadataVersion = KlibMetadataVersion.INSTANCE.toString(),
|
||||
|
||||
+1
@@ -445,6 +445,7 @@ private fun processCLib(
|
||||
nativeBitcodeFiles = compiledFiles + nativeOutputPath,
|
||||
target = tool.target,
|
||||
moduleName = moduleName,
|
||||
libraryVersion = cinteropArguments.libraryVersion,
|
||||
outputPath = outputPath,
|
||||
manifest = def.manifestAddendProperties,
|
||||
dependencies = stdlibDependency + imports.requiredLibraries.toList(),
|
||||
|
||||
Reference in New Issue
Block a user