Initial commit.

This commit is contained in:
Erik C. Thauvin 2016-08-10 20:18:37 -07:00
commit 45ca328c91
9 changed files with 159 additions and 0 deletions

29
.gitignore vendored Normal file
View file

@ -0,0 +1,29 @@
**/.idea/dictionaries
**/.idea/gradle.xml
**/.idea/libraries
**/.idea/tasks.xml
**/.idea/workspace.xml
*.iws
.DS_Store
.classpath
.gradle
.kobalt
.nb-gradle
.project
.settings
/bin
/build
/deploy
/dist
/example/libs
/gen
/gradle.properties
/out
/proguard-project.txt
/project.properties
/target
/test-output
Thumbs.db
ehthumbs.db
kobaltBuild
local.properties

40
kobalt/src/Build.kt Normal file
View file

@ -0,0 +1,40 @@
import com.beust.kobalt.*
import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.application.*
import com.beust.kobalt.plugin.kotlin.*
val repos = repos()
val p = project {
name = "kalxon-test"
group = "com.example"
artifactId = name
version = "0.1"
sourceDirectories {
path("src/main/kotlin")
}
sourceDirectoriesTest {
path("src/test/kotlin")
}
dependencies {
compile("com.beust:klaxon:")
}
dependenciesTest {
compile("org.testng:testng:")
}
assemble {
jar {
}
}
application {
mainClass = "com.example.MainKt"
}
}

Binary file not shown.

View file

@ -0,0 +1 @@
kobalt.version=0.891

2
kobaltw Executable file
View file

@ -0,0 +1,2 @@
#!/bin/env sh
java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $*

4
kobaltw.bat Normal file
View file

@ -0,0 +1,4 @@
@echo off
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
java -jar "%DIRNAME%/kobalt/wrapper/kobalt-wrapper.jar" %*

View file

@ -0,0 +1,13 @@
package com.example
import com.beust.klaxon.*
fun parse(name: String) : Any {
val cls = javaClass<Parser>()
val inputStream = cls.getResourceAsStream(name)!!
return Parser().parse(inputStream)!!
}
fun main(args: Array<String>) {
val obj = parse("test..json") as JsonObject
}

View file

@ -0,0 +1,8 @@
package com.example
import org.testng.annotations.Test
class ExampleTest {
@Test
fun f() = println("Running test")
}

62
test.json Normal file
View file

@ -0,0 +1,62 @@
{
"config": {
"name": "DKS 1802-EPD",
"star": "*",
"opts": [
{
"title": "Delete 4-Digit Entry Code",
"fields": [
{
"hint": "Entry code",
"alpha": false,
"size": 4
}
],
"cmd": "*14[MASTER],[FIELD:1]*"
},
{
"title": "Add 4-Digit Entry Code",
"fields": [
{
"hint": "Entry Code",
"alpha": false,
"size": 4
}
],
"cmd": "*02[MASTER],[FIELD:1]*"
},
{
"title": "Add Name",
"fields": [
{
"hint": "Directory Code",
"alpha": false,
"size": 3
},
{
"hint": "Name",
"alpha": true,
"size": 11
}
],
"cmd": "*66[MASTER],[FIELD:1]*,[FIELD:2]*"
},
{
"title": "Add 7-digit Phone Number",
"fields": [
{
"hint": "Directory Code",
"alpha": false,
"size": 3
},
{
"hint": "Phone Number",
"alpha": true,
"size": 7
}
],
"cmd": "*01[MASTER],[FIELD:1]*,[FIELD:2]*"
}
]
}
}