plugins {
    id 'java'
    id 'com.gradleup.shadow' version "8.3.5"
}

group = 'de.mhsl.craftattack'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    google()

    maven {
        url 'https://jitpack.io'
    }

    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots'
    }
}

dependencies {
    implementation 'net.minestom:minestom-snapshots:ebaa2bbf64'
    implementation 'io.github.TogAr2:MinestomPvP:PR62-SNAPSHOT'
    implementation 'com.google.code.gson:gson:2.10.1'
    implementation 'org.spongepowered:configurate-yaml:4.1.2'
    implementation 'com.google.guava:guava:32.0.1-android'
    implementation 'org.apache.httpcomponents:httpclient:4.5.14'
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

shadowJar {
    archiveClassifier.set("") // Ohne "-all" im Namen
    mergeServiceFiles()
    manifest {
        attributes(
            'Main-Class': 'eu.mhsl.craftattack.teamLobby.Main',
            'Multi-Release': 'true'
        )
    }
}

jar {
    enabled = false
}

build {
    dependsOn(shadowJar)
}

if (file("local.gradle").exists()) {
    apply from: "local.gradle"
}
