Skip to content

Commit

Permalink
Multiplatform: JVM example.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed May 26, 2022
1 parent f5293ac commit e3dbc9a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
15 changes: 15 additions & 0 deletions jvm/build.gradle
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"))
}
14 changes: 14 additions & 0 deletions jvm/src/main/kotlin/com/vanniktech/emoji/jvm/Main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.vanniktech.emoji.jvm

import com.vanniktech.emoji.EmojiManager
import com.vanniktech.emoji.emojiInformation
import com.vanniktech.emoji.emojis
import com.vanniktech.emoji.ios.IosEmojiProvider

fun main() {
val emojiProvider = IosEmojiProvider()
EmojiManager.install(emojiProvider)

val emojiInformation = """Hello from JVM ❤️💚💙""".emojiInformation()
println(emojiInformation)
}
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ pluginManagement {

include ':app'
include ':emoji'
include ':emoji-facebook'
include ':emoji-google'
include ':emoji-google-compat'
include ':emoji-ios'
include ':emoji-material'
include ':emoji-twitter'
include ':emoji-facebook'
include ':jvm'

0 comments on commit e3dbc9a

Please sign in to comment.