Don't add swift_name attribute to categories in framework

This commit is contained in:
Svyatoslav Scherbina
2018-09-12 18:22:35 +03:00
committed by SvyatoslavScherbina
parent 51faa779f6
commit 29748e59df
@@ -112,7 +112,6 @@ abstract class ObjCExportHeaderGenerator(
descriptor: ClassDescriptor? = null, descriptor: ClassDescriptor? = null,
superClass: String? = null, superClass: String? = null,
superProtocols: List<String> = emptyList(), superProtocols: List<String> = emptyList(),
categoryName: String? = null,
members: List<Stub<*>> = emptyList(), members: List<Stub<*>> = emptyList(),
attributes: List<String> = emptyList() attributes: List<String> = emptyList()
): ObjCInterface = ObjCInterface( ): ObjCInterface = ObjCInterface(
@@ -121,7 +120,7 @@ abstract class ObjCExportHeaderGenerator(
descriptor, descriptor,
superClass, superClass,
superProtocols, superProtocols,
categoryName, null,
members, members,
attributes + name.toNameAttributes() attributes + name.toNameAttributes()
) )
@@ -156,8 +155,8 @@ abstract class ObjCExportHeaderGenerator(
})) }))
// TODO: add comment to the header. // TODO: add comment to the header.
stubs.add(objCInterface( stubs.add(ObjCInterface(
kotlinAnyName, kotlinAnyName.objCName,
superProtocols = listOf("NSCopying"), superProtocols = listOf("NSCopying"),
categoryName = "${kotlinAnyName.objCName}Copying" categoryName = "${kotlinAnyName.objCName}Copying"
)) ))
@@ -333,11 +332,11 @@ abstract class ObjCExportHeaderGenerator(
private fun translateExtensions(classDescriptor: ClassDescriptor, declarations: List<CallableMemberDescriptor>) { private fun translateExtensions(classDescriptor: ClassDescriptor, declarations: List<CallableMemberDescriptor>) {
translateClass(classDescriptor) translateClass(classDescriptor)
val name = translateClassName(classDescriptor) val name = translateClassName(classDescriptor).objCName
val members = buildMembers { val members = buildMembers {
translateMembers(declarations) translateMembers(declarations)
} }
stubs.add(objCInterface(name, categoryName = "Extensions", members = members)) stubs.add(ObjCInterface(name, categoryName = "Extensions", members = members))
} }
private fun translateTopLevel(sourceFile: SourceFile, declarations: List<CallableMemberDescriptor>) { private fun translateTopLevel(sourceFile: SourceFile, declarations: List<CallableMemberDescriptor>) {