Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .travis.settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<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
Http://Maven.Apache.Org/Xsd/Settings-1.0.0.Xsd">
<Servers>
<Server>
<Id>yotpo</Id>
<Username>${env.jFROG_USER}</Username>
<Password>${env.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: "mvn -B -V 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.2</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.2'
```

##### Via Direct Download:
Expand Down
21 changes: 9 additions & 12 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.2</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 @@ -141,15 +143,10 @@
</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-virt/</url>
</repository>
</distributionManagement>
</project>
8 changes: 8 additions & 0 deletions src/main/java/com/vdurmont/emoji/EmojiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
* Holds the loaded emojis and provides search functions.
Expand All @@ -18,6 +20,8 @@
*/
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 =
Expand All @@ -29,7 +33,11 @@ public class EmojiManager {
try {
InputStream stream = EmojiLoader.class.getResourceAsStream(PATH);
List<Emoji> emojis = EmojiLoader.loadEmojis(stream);
InputStream rumojiStream = EmojiLoader.class.getResourceAsStream(RUMOJI_PATH);
List<Emoji> rumojiEmojis = EmojiLoader.loadEmojis(rumojiStream);

ALL_EMOJIS = emojis;
ALL_EMOJIS.addAll(rumojiEmojis);
for (Emoji emoji : emojis) {
for (String tag : emoji.getTags()) {
if (EMOJIS_BY_TAG.get(tag) == null) {
Expand Down
Loading