plugins {
    id "com.github.johnrengelman.shadow" version "5.2.0"
    id "java-library"
    id "idea"
    id "maven-publish"
}

group = "re.alwyn974.minecraft.bot"
version = "1.0.17"
archivesBaseName = "MinecraftBOT"

compileJava {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
    options.encoding = "UTF-8"
}

repositories {
    mavenCentral()
    maven {
        url "https://jitpack.io"
    }
    maven {
        url "https://alwyn974.github.io/maven"
    }
    maven {
        url "https://repo.opencollab.dev/maven-releases/"
    }
}

dependencies {
    testImplementation "org.junit.jupiter:junit-jupiter-api:5.9.0"
    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.9.0"

    implementation "org.slf4j:slf4j-api:1.7.36"
    implementation "org.apache.logging.log4j:log4j:2.18.0"
    implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.18.0"

    // https://docs.adventure.kyori.net/serializer/index.html
    // https://docs.adventure.kyori.net/minimessage/index.html
    implementation "net.kyori:adventure-text-minimessage:4.12.0"
    // implementation "net.kyori:adventure-text-serializer-plain:4.12.0"
    // implementation "net.kyori:adventure-text-serializer-legacy:4.12.0"

    implementation 'com.github.steveice10:mcprotocollib:1.18.2-1'

    implementation "commons-cli:commons-cli:1.5.0"
    implementation "re.alwyn974:logger:1.0.0"
    implementation "org.reflections:reflections:0.10.2"
    implementation 'com.formdev:flatlaf:3.0' //this is magic :o
}

test {
    useJUnitPlatform()
}

jar {
    manifest {
        attributes "Main-Class": "re.alwyn974.minecraft.bot.MinecraftBOT"
    }
    from "LICENSE"
}
