Skip to content

Commit

Permalink
Prepare version 0.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed May 17, 2024
1 parent 6bd9008 commit 40baf68
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 32 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Change Log

Version 0.19.0 *(In development)*
---------------------------------
Version 0.19.0 *(2024-05-17)*
-----------------------------

- Bug fix: Fix EmojiUtils.isOnlyEmojis not detecting emojis with variant selectors. [\#1087](https://github.com/vanniktech/Emoji/pull/1087) ([vanniktech](https://github.com/vanniktech))
- API: New emoji-androidx-emoji2 module which uses androidx.emoji2:emoji2 [\#1086](https://github.com/vanniktech/Emoji/pull/1086) ([vanniktech](https://github.com/vanniktech))
- Technical: Update Emoji source to 15.1.2 to include new emojis. [\#1085](https://github.com/vanniktech/Emoji/pull/1085) ([vanniktech](https://github.com/vanniktech))

Version 0.18.0 *(2023-12-11)*
-----------------------------
Expand Down
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A Kotlin Multiplatform library to add Emoji support to your Android App / JVM Ba
- [`EmojiTextView`](./emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiTextView.kt)
- For convenience, there's also a [`EmojiLayoutFactory`](./emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiLayoutFactory.kt), which can be used to get automatic Emoji support when using normal Android Views such as `TextView`, `Checkbox`, etc.

The library has 4 different sprites providers to choose from ([iOS](#ios-emojis), [Google](#google), [Facebook](#facebook) & [Twitter](#twitter)). The emoji's are packaged as pictures and loaded at runtime. If you want to use a Font provider, check out [Google Compat](#google-compat).
The library has 4 different sprites providers to choose from ([iOS](#ios-emojis), [Google](#google), [Facebook](#facebook) & [Twitter](#twitter)). The emoji's are packaged as pictures and loaded at runtime. If you want to use a Font provider, check out [Google Compat](#google-compat). Alternatively, we also offer [AndroidX Emoji2 support](#androidx-emoji2).

## iOS Emojis

Expand All @@ -26,7 +26,7 @@ The library has 4 different sprites providers to choose from ([iOS](#ios-emojis)
For getting the above iOS Emojis, add the dependency:

```groovy
implementation("com.vanniktech:emoji-ios:0.18.0")
implementation("com.vanniktech:emoji-ios:0.19.0")
```

And install the provider in your Application class.
Expand All @@ -45,7 +45,7 @@ EmojiManager.install(IosEmojiProvider())
For getting the above Google Emojis, add the dependency:

```groovy
implementation("com.vanniktech:emoji-google:0.18.0")
implementation("com.vanniktech:emoji-google:0.19.0")
```

And install the provider in your Application class.
Expand All @@ -64,7 +64,7 @@ EmojiManager.install(GoogleEmojiProvider())
For getting the above Facebook Emojis, add the dependency:

```groovy
implementation("com.vanniktech:emoji-facebook:0.18.0")
implementation("com.vanniktech:emoji-facebook:0.19.0")
```

And install the provider in your Application class.
Expand All @@ -83,7 +83,7 @@ EmojiManager.install(FacebookEmojiProvider())
For getting the above Twitter Emojis, add the dependency:

```groovy
implementation("com.vanniktech:emoji-twitter:0.18.0")
implementation("com.vanniktech:emoji-twitter:0.19.0")
```

And install the provider in your Application class.
Expand All @@ -102,7 +102,7 @@ EmojiManager.install(TwitterEmojiProvider())
For getting the above Google Emojis, add the dependency (only works for Android Apps):

```groovy
implementation("com.vanniktech:emoji-google-compat:0.18.0")
implementation("com.vanniktech:emoji-google-compat:0.19.0")
```

And install the provider in your Application class.
Expand Down Expand Up @@ -143,22 +143,44 @@ Instead of using pictures, the Emojis are loaded via a Font which is downloaded
</string-array>
```

## AndroidX Emoji2

<img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_1.png" alt="Normal Keyboard" width="270"><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_2.png" alt="Emoji Keyboard" width="270" hspace="20"><img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_3.png" alt="Recent Emojis" width="270">

For getting the above Google Emojis, add the dependency (only works for Android Apps):

```groovy
implementation("com.vanniktech:emoji-androidx-emoji2:0.19.0")
```

And install the provider in your Application class.

```kotlin
import androidx.core.provider.FontRequest
import androidx.emoji2.text.EmojiCompat
import androidx.emoji.text.FontRequestEmojiCompatConfig
import com.vanniktech.emoji.EmojiManager
import com.vanniktech.emoji.googlecompat.GoogleCompatEmojiProvider

EmojiManager.install(GoogleCompatEmojiProvider(EmojiCompat.init(this))
```

## Custom Emojis

If you want to display your own Emojis you can create your own implementation of [`EmojiProvider`](./emoji/src/commonMain/kotlin/com/vanniktech/emoji/EmojiProvider.kt) and pass it to `EmojiManager.install`.

All of the core API lays in `emoji`, which is being pulled in automatically by the providers:

```groovy
implementation("com.vanniktech:emoji:0.18.0")
implementation("com.vanniktech:emoji:0.19.0")
```

## Android Material

Material Design Library bindings can be included via:

```groovy
implementation("com.vanniktech:emoji-material:0.18.0")
implementation("com.vanniktech:emoji-material:0.19.0")
```

- [`EmojiMaterialButton`](./emoji-material/src/androidMain/kotlin/com/vanniktech/emoji/material/mojiMaterialButton.kt)
Expand Down Expand Up @@ -337,6 +359,7 @@ implementation("com.vanniktech:emoji:0.19.0-SNAPSHOT")
implementation("com.vanniktech:emoji-ios:0.19.0-SNAPSHOT")
implementation("com.vanniktech:emoji-google:0.19.0-SNAPSHOT")
implementation("com.vanniktech:emoji-google-compat:0.19.0-SNAPSHOT")
implementation("com.vanniktech:emoji-androidx-emoji2:0.19.0-SNAPSHOT")
implementation("com.vanniktech:emoji-twitter:0.19.0-SNAPSHOT")
implementation("com.vanniktech:emoji-facebook:0.19.0-SNAPSHOT")
implementation("com.vanniktech:emoji-material:0.19.0-SNAPSHOT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,19 @@ import tools.fastlane.screengrab.locale.LocaleTestRule

@Rule @JvmField val localeTestRule = LocaleTestRule()

@Test fun takeScreenShotsIos() {
start(Variant.IOS)
}

@Test fun takeScreenShotsEmojiGoogle() {
start(Variant.GOOGLE)
}

@Test fun takeScreenShotsEmojiGoogleCompat() {
start(Variant.GOOGLE_COMPAT)
}

@Test fun takeScreenShotsEmojiTwitter() {
start(Variant.TWITTER)
}

@Test fun takeScreenShotsEmojiFacebook() {
start(Variant.FACEBOOK)
}
@Test fun takeScreenShotsIos() = start(Variant.IOS)
@Test fun takeScreenShotsEmojiGoogle() = start(Variant.GOOGLE)
@Test fun takeScreenShotsEmojiGoogleCompat() = start(Variant.GOOGLE_COMPAT)
@Test fun takeScreenShotsEmojiAndroidxEmoji2() = start(Variant.ANDROIDX_EMOJI2)
@Test fun takeScreenShotsEmojiTwitter() = start(Variant.TWITTER)
@Test fun takeScreenShotsEmojiFacebook() = start(Variant.FACEBOOK)

internal enum class Variant(
val title: String,
) {
GOOGLE("Google"),
GOOGLE_COMPAT("Google Compat"),
ANDROIDX_EMOJI2("AndroidX Emoji 2"),
IOS("iOS"),
TWITTER("Twitter"),
FACEBOOK("Facebook"),
Expand All @@ -78,8 +66,8 @@ import tools.fastlane.screengrab.locale.LocaleTestRule

// First text.
onView(withId(R.id.chatEmoji)).perform(click())
val firstEmojis = intArrayOf(0x1f913, 0x1F60E, 0x1F921, 0x1F920, 0x1F60F, 0x1F3BE)
onView(withId(R.id.chatEditText)).perform(appendText("Hello what's up? " + String(firstEmojis, 0, firstEmojis.size)))
val firstEmojis = intArrayOf(0x1F600, 0x1F60E, 0x1F921, 0x1F920, 0x1F60F, 0x1F3BE)
onView(withId(R.id.chatEditText)).perform(appendText("${variant.title} provider, what's up? " + String(firstEmojis, 0, firstEmojis.size)))
Thread.sleep(500) // Espresso does not synchronize it right away.
Screengrab.screenshot(name + "_1")
onView(withId(R.id.chatSend)).perform(click())
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.vanniktech
VERSION_NAME=0.19.0-SNAPSHOT
VERSION_NAME=0.19.0

POM_DESCRIPTION=A simple library to add Emoji support to your Android Application

Expand Down

0 comments on commit 40baf68

Please sign in to comment.