Moved from Gradle to bld
This commit is contained in:
parent
b7aee90edd
commit
d326f5c6dd
83 changed files with 905 additions and 907 deletions
23
examples/gradle/src/main/kotlin/com/example/IsgdExample.kt
Normal file
23
examples/gradle/src/main/kotlin/com/example/IsgdExample.kt
Normal file
|
@ -0,0 +1,23 @@
|
|||
package com.example
|
||||
|
||||
import net.thauvin.erik.isgd.Isgd
|
||||
import net.thauvin.erik.isgd.IsgdException
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
if (args.isNotEmpty()) {
|
||||
args.forEach {
|
||||
try {
|
||||
if (it.contains("is.gd"))
|
||||
println(it + " <-- " + Isgd.lookup(it))
|
||||
else
|
||||
println(it + " --> " + Isgd.shorten(it))
|
||||
} catch (e: IsgdException) {
|
||||
println(e.message)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
println("Try specifying one or more URLs as arguments.")
|
||||
}
|
||||
exitProcess(0)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue