plugins {
    id 'java'
    id 'org.jetbrains.kotlin.jvm' version '1.4.10'

}

group 'codes.mii'
version '1.0-SNAPSHOT'
apply plugin: 'application'

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib"
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10"
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

jar{
    manifest{
        attributes 'Main-Class' : 'codes.mii.SaveEditor.MainKt'
    }

    from {
        configurations.compile.collect {
            it.isDirectory() ? it : zipTree(it)
        }
    }
}

task fatJar(type: Jar) {
    manifest {
        attributes 'Main-Class': 'codes.mii.SaveEditor.MainKt'
    }

    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}

application {
    mainClassName = "codes.mii.SaveEditor.MainKt"
}