Skip to content

Commit

Permalink
Multiplatform: Move Emoji interface to commonMain. (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech authored May 25, 2022
1 parent 03e36dc commit b273fb6
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package com.vanniktech.emoji.facebook

import com.vanniktech.emoji.Emoji
import com.vanniktech.emoji.IgnoredOnParcel
import com.vanniktech.emoji.Parcelable
import com.vanniktech.emoji.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@Parcelize internal class FacebookEmoji internal constructor(
override val unicode: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package com.vanniktech.emoji.googlecompat

import com.vanniktech.emoji.Emoji
import com.vanniktech.emoji.IgnoredOnParcel
import com.vanniktech.emoji.Parcelable
import com.vanniktech.emoji.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@Parcelize internal class GoogleCompatEmoji internal constructor(
override val unicode: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package com.vanniktech.emoji.google

import com.vanniktech.emoji.Emoji
import com.vanniktech.emoji.IgnoredOnParcel
import com.vanniktech.emoji.Parcelable
import com.vanniktech.emoji.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@Parcelize internal class GoogleEmoji internal constructor(
override val unicode: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package com.vanniktech.emoji.ios

import com.vanniktech.emoji.Emoji
import com.vanniktech.emoji.IgnoredOnParcel
import com.vanniktech.emoji.Parcelable
import com.vanniktech.emoji.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@Parcelize internal class IosEmoji internal constructor(
override val unicode: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package com.vanniktech.emoji.twitter

import com.vanniktech.emoji.Emoji
import com.vanniktech.emoji.IgnoredOnParcel
import com.vanniktech.emoji.Parcelable
import com.vanniktech.emoji.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@Parcelize internal class TwitterEmoji internal constructor(
override val unicode: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ package com.vanniktech.emoji

actual typealias Parcelable = android.os.Parcelable
actual typealias Parcelize = kotlinx.parcelize.Parcelize
actual typealias IgnoredOnParcel = kotlinx.parcelize.IgnoredOnParcel
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.vanniktech.emoji

import kotlinx.parcelize.IgnoredOnParcel

@Parcelize data class TestEmoji(
override val unicode: String,
override val shortcodes: List<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ expect interface Parcelable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
expect annotation class Parcelize()

@OptIn(ExperimentalMultiplatform::class)
@OptionalExpectation
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
expect annotation class IgnoredOnParcel()
2 changes: 1 addition & 1 deletion generator/template/Emoji.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package com.vanniktech.emoji.<%= package %>

import com.vanniktech.emoji.Emoji
import com.vanniktech.emoji.IgnoredOnParcel
import com.vanniktech.emoji.Parcelable
import com.vanniktech.emoji.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@Parcelize internal class <%= name %> internal constructor(
override val unicode: String,
Expand Down
2 changes: 1 addition & 1 deletion generator/template/EmojiCompat.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package com.vanniktech.emoji.<%= package %>

import com.vanniktech.emoji.Emoji
import com.vanniktech.emoji.IgnoredOnParcel
import com.vanniktech.emoji.Parcelable
import com.vanniktech.emoji.Parcelize
import kotlinx.parcelize.IgnoredOnParcel

@Parcelize internal class <%= name %> internal constructor(
override val unicode: String,
Expand Down

0 comments on commit b273fb6

Please # to comment.