plugins {
    id "java"
}

sourceSets {
    main {
        java {
            srcDirs(
                "src/main/java"
            )
        }
    }
}

repositories {
    mavenCentral()
}

tasks.withType(JavaCompile) {
    options.warnings = false
    options.compilerArgs << "-Xmaxerrs" << "1000"
}

dependencies {
    implementation fileTree(dir: '.', include: '*.jar')
}

jar {
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE

    manifest {
        attributes(
                'Main-Class': 'net.md_5.bungee.BungeeCord'
        )
    }
    from {
        configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
    }
}