diff --git a/CHANGELOG.md b/CHANGELOG.md
index 095e9c45c3..1de54cab86 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)*
-----------------------------
diff --git a/README.md b/README.md
index 58b426e2d0..c19a1865e2 100644
--- a/README.md
+++ b/README.md
@@ -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
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -143,6 +143,28 @@ Instead of using pictures, the Emojis are loaded via a Font which is downloaded
```
+## AndroidX Emoji2
+
+
+
+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`.
@@ -150,7 +172,7 @@ If you want to display your own Emojis you can create your own implementation of
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
@@ -158,7 +180,7 @@ implementation("com.vanniktech:emoji:0.18.0")
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)
@@ -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")
diff --git a/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt b/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt
index 5b7fec894d..d105404184 100644
--- a/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt
+++ b/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt
@@ -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"),
@@ -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())
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_1.png
new file mode 100644
index 0000000000..881c1d380a
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_1.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_2.png
new file mode 100644
index 0000000000..e5cf68f616
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_2.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_3.png
new file mode 100644
index 0000000000..da45af92a3
Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/androidx_emoji2_3.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_1.png
index 068cde072e..263af5e1e2 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_1.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_1.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_2.png
index 48afa11c34..3d2dca6f7f 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_2.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_2.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_3.png
index 734a6f52ef..271f79996a 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_3.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/facebook_3.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_1.png
index 93de8cd4c7..cadec4ded9 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_1.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_1.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_2.png
index 95fee06b06..9e5ad193c2 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_2.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_2.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_3.png
index b2ec2d7add..5d308224b2 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_3.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_3.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_1.png
index 568b440763..2233f82bb9 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_1.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_1.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_2.png
index 8438176588..6b415e7051 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_2.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_2.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_3.png
index 01d2d03697..87f43eb262 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_3.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/google_compat_3.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_1.png
index 974a65dc24..a5198b514c 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_1.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_1.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_2.png
index d2b08c4335..49a5e62ba7 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_2.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_2.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_3.png
index 27380b1a3f..dc70c00e9a 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_3.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/ios_3.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_1.png
index 59342ebad5..1e56f981eb 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_1.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_1.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_2.png
index dfbd4c7a0c..e0844e4dba 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_2.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_2.png differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_3.png
index 3b7bded6b5..950104a8a1 100644
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_3.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/twitter_3.png differ
diff --git a/gradle.properties b/gradle.properties
index 81d6933e2b..8e49276c95 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -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