-
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5293ac
commit 5e3ab17
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apply plugin: "kotlin" | ||
apply plugin: "application" | ||
|
||
mainClassName = "com.vanniktech.emoji.jvm.MainKt" | ||
|
||
defaultTasks("run") | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
dependencies { | ||
implementation(project(":emoji-ios")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.vanniktech.emoji.jvm | ||
|
||
import com.vanniktech.emoji.EmojiManager | ||
import com.vanniktech.emoji.emojiInformation | ||
import com.vanniktech.emoji.ios.IosEmojiProvider | ||
import com.vanniktech.emoji.search.SearchEmojiManager | ||
|
||
fun main() { | ||
val emojiProvider = IosEmojiProvider() | ||
EmojiManager.install(emojiProvider) | ||
|
||
val emojiString = """Hello from JVM ❤️💚💙""" | ||
println("\nGetting emoji information from $emojiString:") | ||
val emojiInformation = emojiString.emojiInformation() | ||
println(emojiInformation) | ||
|
||
val query = "swim" | ||
println("\nSearching for all emojis with $query:") | ||
SearchEmojiManager().search(query = query) | ||
.forEach { | ||
println(it) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters