Rename klibraries -> klibs

This commit is contained in:
Ilya Matveev
2018-09-19 11:55:29 +03:00
committed by Ilya Matveev
parent 4368ad2b1c
commit c8af254620
5 changed files with 8 additions and 8 deletions
@@ -59,7 +59,7 @@ interface KotlinNativeBinary : ComponentWithDependencies, BuildableComponent, Co
* The link libraries (klibs only!) used to link this binary. * The link libraries (klibs only!) used to link this binary.
* Includes the link libraries of the component's dependencies. * Includes the link libraries of the component's dependencies.
*/ */
val klibraries: FileCollection val klibs: FileCollection
/** /**
* Binary kind in terms of the KN compiler (program, library, dynamic etc). * Binary kind in terms of the KN compiler (program, library, dynamic etc).
@@ -102,8 +102,8 @@ abstract class AbstractKotlinNativeBinary(
override fun getDependencies(): ComponentDependencies = dependencies override fun getDependencies(): ComponentDependencies = dependencies
fun getImplementationDependencies(): Configuration = dependencies.implementationDependencies fun getImplementationDependencies(): Configuration = dependencies.implementationDependencies
// A configuration containing klibraries // A configuration containing klibs
override val klibraries = configurations.create(names.withPrefix("klibraries")).apply { override val klibs = configurations.create(names.withPrefix("klibs")).apply {
isCanBeConsumed = false isCanBeConsumed = false
attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, KotlinNativeUsage.KLIB)) attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, KotlinNativeUsage.KLIB))
attributes.attribute(CppBinary.DEBUGGABLE_ATTRIBUTE, debuggable) attributes.attribute(CppBinary.DEBUGGABLE_ATTRIBUTE, debuggable)
@@ -213,7 +213,7 @@ class KotlinNativeBasePlugin: Plugin<ProjectInternal> {
} }
} }
klibraries.dependencies.add(project.dependencies.create(files(interopTask.outputFileProvider))) klibs.dependencies.add(project.dependencies.create(files(interopTask.outputFileProvider)))
if (this is KotlinNativeLibrary) { if (this is KotlinNativeLibrary) {
linkElements.get().outgoing.artifact(interopTask.outputFileProvider) { linkElements.get().outgoing.artifact(interopTask.outputFileProvider) {
@@ -54,12 +54,12 @@ open class KotlinNativeCompile @Inject constructor(internal val binary: Abstract
} }
val libraries: Configuration val libraries: Configuration
@InputFiles get() = binary.klibraries @InputFiles get() = binary.klibs
override fun getClasspath(): FileCollection = libraries override fun getClasspath(): FileCollection = libraries
override fun setClasspath(configuration: FileCollection?) { override fun setClasspath(configuration: FileCollection?) {
throw UnsupportedOperationException("Use klibraries to set compile classpath in Kotlin/Native") throw UnsupportedOperationException("Use klibs to set compile classpath in Kotlin/Native")
} }
val optimized: Boolean @Input get() = binary.optimized val optimized: Boolean @Input get() = binary.optimized
@@ -70,8 +70,8 @@ object KonanToolingModelBuilder : ToolingModelBuilder {
compileTask.name, compileTask.name,
sourceRoots.toList(), sourceRoots.toList(),
sources.files.toList(), sources.files.toList(),
klibraries.files.toList(), klibs.files.toList(),
klibraries.files.map { it.parentFile } klibs.files.map { it.parentFile }
) )
} }