Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yotp 323 add exclamantion heart icon #198

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d1b154c
feat(EmojiManager.java): added more emojis to list
drnir Dec 28, 2021
59e041a
Merge pull request #1 from YotpoLtd/GR-16418-added-emojis-from-rumoji…
drnir Dec 28, 2021
97838a6
Update README.md
drnir Dec 28, 2021
58dba99
Update README.md
drnir Dec 28, 2021
1e390b5
feat(travis.yml): added configurations
drnir Dec 28, 2021
8e11333
Merge pull request #2 from YotpoLtd/GR-16418-added-emojis-from-rumoji…
drnir Dec 28, 2021
918a9a8
feat(pom.xml): changed distributionManagement
drnir Dec 28, 2021
c5031b8
Merge pull request #3 from YotpoLtd/GR16418-change-dist-in-pom
drnir Dec 28, 2021
08d5421
update(pom.xml): Fix deployment
eransamo Dec 28, 2021
1825158
Merge pull request #4 from YotpoLtd/mvn-settings-fix
eransamo Dec 28, 2021
6e0f595
update(pom.xml): use java-local repository
eransamo Dec 28, 2021
c3b2ad6
Merge pull request #5 from YotpoLtd/mvn-settings-fix
eransamo Dec 28, 2021
ad2db55
feat(rumojiEmojis.json): added differant codes to emojis
drnir Dec 28, 2021
a4eaedc
update(.travis.yml): Fix deployment stage
eransamo Dec 28, 2021
17cd815
Merge pull request #6 from YotpoLtd/added-differant-emojis
drnir Dec 28, 2021
47acc42
Merge pull request #7 from YotpoLtd/mvn-settings-fix
eransamo Dec 28, 2021
aca6d20
update(travis): Fix deployment 2
eransamo Dec 28, 2021
5967654
Merge pull request #8 from YotpoLtd/mvn-settings-fix
eransamo Dec 28, 2021
371f62f
feat(travis.settings): changed envars
drnir Dec 28, 2021
332cffb
Merge pull request #9 from YotpoLtd/chaged-env-vars
drnir Dec 28, 2021
eeb1c44
feat(travis.settings): changed envars
drnir Dec 28, 2021
1da255e
Merge pull request #10 from YotpoLtd/chaged-env-vars
drnir Dec 28, 2021
eb22532
feat(pom): changed version
drnir Dec 28, 2021
6f03b7a
feat(EmojiManager): fixed all emojis
drnir Dec 28, 2021
d5f21de
feat(EmojiManager): fixed all emojis
drnir Dec 28, 2021
50d5a8f
feat(EmojiManager): fixed all emojis
drnir Dec 28, 2021
0170f22
feat(EmojiManager): fixed all emojis
drnir Dec 28, 2021
a0ac5c0
feat(rumojiEmojis): added unicode to emoji tag
drnir Dec 29, 2021
a4f4844
feat(rumojiEmojis): added unicode to emoji tag
drnir Dec 29, 2021
fbc7636
feat(rumojiEmojis): added unicode to emoji tag
drnir Dec 29, 2021
ec8feec
fix(emojis.json): added missing emoji
idansi Sep 4, 2022
bb8fd68
testing version change
idansi Sep 4, 2022
264a006
Merge pull request #11 from YotpoLtd/YO-16921-add-missing-emoji
idansi Sep 4, 2022
0d49e8e
fix(emojis.json) - added exlamantion heart icon alias
idansi Dec 26, 2022
ecee973
Update pom.xml
idansi Dec 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>yotpo</id>
<username>${JFROG_USER}</username>
<password>${JFROG_PASSWORD}</password>
</server>
</servers>
</settings>
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
sudo: false
language: java
dist: precise
dist: xenial
jdk:
- openjdk6
- oraclejdk7
- openjdk7
- oraclejdk8
- openjdk8
before_install:
- cp .travis.settings.xml $HOME/.m2/settings.xml
deploy:
provider: script
script: cp .travis.settings.xml $HOME/.m2/settings.xml; mvn -B deploy
skip_cleanup: true
after_success:
- mvn clean cobertura:cobertura coveralls:cobertura
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ _The missing emoji library for java._
<dependency>
<groupId>com.vdurmont</groupId>
<artifactId>emoji-java</artifactId>
<version>5.1.1</version>
<version>5.1.7</version>
</dependency>
```

Expand All @@ -25,7 +25,7 @@ You can also download the project, build it with `mvn clean install` and add the
##### Via Gradle:

```gradle
compile 'com.vdurmont:emoji-java:5.1.1'
compile 'com.vdurmont:emoji-java:5.1.7'
```

##### Via Direct Download:
Expand Down
33 changes: 9 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.vdurmont</groupId>
<artifactId>emoji-java</artifactId>
<version>5.1.1</version>
<version>5.1.9</version>
<packaging>jar</packaging>

<name>emoji-java</name>
Expand Down Expand Up @@ -35,19 +35,21 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
<version>20211205</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -58,7 +60,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.2</version>
<version>2.7</version>
<configuration>
<format>xml</format>
<maxmem>256m</maxmem>
Expand Down Expand Up @@ -124,32 +126,15 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<id>yotpo</id>
<name>java-virt</name>
<url>https://yotpo.jfrog.io/yotpo/java-local</url>
</repository>
</distributionManagement>
</project>
25 changes: 13 additions & 12 deletions src/main/java/com/vdurmont/emoji/EmojiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@

import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* Holds the loaded emojis and provides search functions.
Expand All @@ -18,19 +13,25 @@
*/
public class EmojiManager {
private static final String PATH = "/emojis.json";
private static final String RUMOJI_PATH = "/rumojiExtendedEmojis.json";

private static final Map<String, Emoji> EMOJIS_BY_ALIAS =
new HashMap<String, Emoji>();
private static final Map<String, Set<Emoji>> EMOJIS_BY_TAG =
new HashMap<String, Set<Emoji>>();
private static final List<Emoji> ALL_EMOJIS;
private static final List<Emoji> ALL_EMOJIS = new ArrayList<>();
static final EmojiTrie EMOJI_TRIE;

static {
try {
InputStream stream = EmojiLoader.class.getResourceAsStream(PATH);
List<Emoji> emojis = EmojiLoader.loadEmojis(stream);
ALL_EMOJIS = emojis;
for (Emoji emoji : emojis) {
InputStream rumojiStream = EmojiLoader.class.getResourceAsStream(RUMOJI_PATH);
List<Emoji> rumojiEmojis = EmojiLoader.loadEmojis(rumojiStream);

ALL_EMOJIS.addAll(emojis);
ALL_EMOJIS.addAll(rumojiEmojis);
for (Emoji emoji : ALL_EMOJIS) {
for (String tag : emoji.getTags()) {
if (EMOJIS_BY_TAG.get(tag) == null) {
EMOJIS_BY_TAG.put(tag, new HashSet<Emoji>());
Expand All @@ -42,7 +43,7 @@ public class EmojiManager {
}
}

EMOJI_TRIE = new EmojiTrie(emojis);
EMOJI_TRIE = new EmojiTrie(ALL_EMOJIS);
Collections.sort(ALL_EMOJIS, new Comparator<Emoji>() {
public int compare(Emoji e1, Emoji e2) {
return e2.getUnicode().length() - e1.getUnicode().length();
Expand Down
8 changes: 6 additions & 2 deletions src/main/resources/emojis.json
Original file line number Diff line number Diff line change
Expand Up @@ -12353,7 +12353,8 @@
"supports_fitzpatrick": true,
"aliases": [
"raised_hand_with_fingers_splayed",
"splayed_hand"
"splayed_hand",
"fingers_splayed"
],
"tags": []
},
Expand Down Expand Up @@ -12382,7 +12383,10 @@
"emoji": "\u2763",
"description": "heavy heart exclamation mark ornament",
"aliases": [
"exclamation_heart"
"exclamation_heart",
"heart_exclamation",
"heavy_heart_exclamation",
"heavy_heart_exclamation_mark_ornament"
],
"tags": []
},
Expand Down
Loading