plugins {
    // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
    id 'org.jetbrains.kotlin.jvm' version '1.5.0'

    // Apply the application plugin to add support for building a CLI application in Java.
    id 'application'
    id 'java'
}

repositories {
    // Use Maven Central for resolving dependencies.
    mavenCentral()
}

dependencies {
    // Use the Kotlin test library.
    testImplementation 'org.jetbrains.kotlin:kotlin-test'
    // Use the Kotlin JUnit integration.
    testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
    implementation "org.json:json:20171018"
    implementation 'com.squareup.okhttp3:okhttp:3.14.6'
    implementation 'com.google.code.gson:gson:2.8.6'
}


application {
    // Define the main class for the application.
    mainClass = 'send.whatsapp.message.AppKt'
}
jar {
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
    manifest {
        attributes (
                'Main-Class': 'send.whatsapp.message.AppKt'
        )
    }
    from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}

