buildscript {
    ext.kotlin_version = '1.1.60'

    repositories {
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: "kotlin"
apply plugin: "application"

mainClassName = 'todomvcfx.tornadofx.app.TornadoFXAppKt'

repositories {
    mavenLocal()
    mavenCentral()
}

apply plugin: 'application'

dependencies {
    compile 'no.tornado:tornadofx:1.7.12'
    compile 'de.jensd:fontawesomefx:8.9'
    testCompile 'junit:junit:4.12'
}

compileKotlin {
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

jar {
    manifest {
        attributes(
                'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
                'Main-Class': 'todomvcfx.tornadofx.app.TornadoFXAppKt'
        )
    }
    from (configurations.compile.collect { entry -> zipTree(entry) }) {
        exclude 'META-INF/MANIFEST.MF'
        exclude 'META-INF/*.SF'
        exclude 'META-INF/*.DSA'
        exclude 'META-INF/*.RSA'
    }
}