import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.5.31"
    application
    kotlin("plugin.serialization") version "1.5.31"
}

group = "me.bas"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

//tasks.jar {
//    manifest {
//        attributes["Main-Class"] = "MainKt"
//    }
//    configurations["compileClasspath"].forEach { file: File ->
//        from(zipTree(file.absoluteFile))
//    }
//
//    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
//}

dependencies {
    testImplementation(kotlin("test"))
    implementation(files("./lib/cid-sdk-java.jar"))
    implementation(files("./lib/cid-sdk-zorg-id.jar"))
    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0")
}

tasks.test {
    useJUnit()
}

tasks.withType<KotlinCompile>() {
    kotlinOptions.jvmTarget = "1.8"
}

application {
    mainClass.set("MainKt")
}

