Initial commit.
This commit is contained in:
commit
45ca328c91
9 changed files with 159 additions and 0 deletions
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal 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
40
kobalt/src/Build.kt
Normal 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"
|
||||
}
|
||||
}
|
BIN
kobalt/wrapper/kobalt-wrapper.jar
Normal file
BIN
kobalt/wrapper/kobalt-wrapper.jar
Normal file
Binary file not shown.
1
kobalt/wrapper/kobalt-wrapper.properties
Normal file
1
kobalt/wrapper/kobalt-wrapper.properties
Normal file
|
@ -0,0 +1 @@
|
|||
kobalt.version=0.891
|
2
kobaltw
Executable file
2
kobaltw
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/env sh
|
||||
java -jar "`dirname "$0"`/kobalt/wrapper/kobalt-wrapper.jar" $*
|
4
kobaltw.bat
Normal file
4
kobaltw.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
@echo off
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
java -jar "%DIRNAME%/kobalt/wrapper/kobalt-wrapper.jar" %*
|
13
src/main/kotlin/com/example/Main.kt
Normal file
13
src/main/kotlin/com/example/Main.kt
Normal 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
|
||||
}
|
8
src/test/kotlin/com/example/MainTest.kt
Normal file
8
src/test/kotlin/com/example/MainTest.kt
Normal 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
62
test.json
Normal 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]*"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue