2 Commits
1.1 ... master

3 changed files with 16 additions and 12 deletions

View File

@@ -1,8 +1,5 @@
group 'ninja.javafx'
version '1.1-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.0.4'
ext.kotlin_version = '1.3.72'
repositories {
mavenCentral()
@@ -12,18 +9,27 @@ buildscript {
}
}
apply plugin: 'kotlin'
apply plugin: 'application'
mainClassName = 'ninja.javafx.smartcsv.fx.converter.ConverterFX'
plugins {
id "org.jetbrains.kotlin.jvm" version "$kotlin_version"
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}
repositories {
mavenCentral()
jcenter()
}
javafx {
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.beust:klaxon:0.24'
compile 'no.tornado:tornadofx:1.5.6'
}
group 'ninja.javafx'
version '1.1-SNAPSHOT'
mainClassName = 'ninja.javafx.smartcsv.fx.converter.ConverterFX'

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip

View File

@@ -85,11 +85,9 @@ class Converter(val name: String) {
}
@Suppress("UNCHECKED_CAST")
fun constraint(column : JsonObject, key : String, value: Any?) {
if (value == null) return
val constraints = column["constraints"] as JsonObject? ?: JsonObject(HashMap<String, Any>())
column["constraints"] = constraints
val constraints = column.getOrPut("constraints") { JsonObject(mutableMapOf()) } as JsonObject
constraints[key] = value
}