plugins {
    id 'java'
    id 'idea'
    id "com.github.ben-manes.versions" version "0.52.0"
}

java {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

sourceSets.main.java.srcDirs = ['src']
sourceSets.test.java.srcDirs = ['test']
sourceSets.main.resources.srcDirs = ['resources']

dependencies {
    if (project.hasProperty("useMavenVersion")) {
        implementation 'io.github.andrewauclair:modern-docking-ui:' + version
        implementation 'io.github.andrewauclair:modern-docking-multi-app:' + version
    }
    else {
        implementation project(':docking-ui')
        implementation project(':docking-multi-app')
    }

    implementation 'com.formdev:flatlaf:' + flatLafVersion
    implementation 'com.formdev:flatlaf-intellij-themes:' + flatLafVersion

    implementation 'com.ardikars.pcap:pcap-jdk7:1.5.3'

    implementation 'info.picocli:picocli:4.7.7'
}

jar {
    manifest {
        attributes "Main-Class": "basic.MainFrame"
    }

    from {
        configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
    }
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

tasks.withType(Javadoc).all { enabled = false } // don't generate javadocs for the demo projects
