plugins {
    id 'java'
    id 'org.jetbrains.kotlin.jvm' version '1.3.72'
    id 'org.jetbrains.kotlin.plugin.serialization' version '1.3.70'
}

group 'org.hydev.experiment'
version '0.0.0.1'

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0"

    // https://mvnrepository.com/artifact/org.apache.commons/httpclient
    compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.9'

    // https://mvnrepository.com/artifact/com.googlecode.aviator/aviator
    compile group: 'com.googlecode.aviator', name: 'aviator', version: '5.1.4'

    // https://mvnrepository.com/artifact/com.google.zxing/core
    compile group: 'com.google.zxing', name: 'core', version: '3.4.1'

    // https://mvnrepository.com/artifact/com.google.zxing/javase
    compile group: 'com.google.zxing', name: 'javase', version: '3.4.1'

    // https://mvnrepository.com/artifact/com.beust/jcommander
    compile group: 'com.beust', name: 'jcommander', version: '1.78'

    // https://mvnrepository.com/artifact/commons-io/commons-io
    compile group: 'commons-io', name: 'commons-io', version: '2.8.0'

    // https://mvnrepository.com/artifact/com.google.guava/guava
    compile group: 'com.google.guava', name: 'guava', version: '30.0-jre'

    // https://mvnrepository.com/artifact/org.hydev/HyLogger
    compile group: 'org.hydev', name: 'HyLogger', version: '2.1.0.378'

    testCompile group: 'junit', name: 'junit', version: '4.12'
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

jar {
    manifest {
        attributes "Main-Class": "org.hydev.experiment.MainKt"
    }

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