plugins {
java
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "de.limited_dev"
version = "0.1.0-alpha"
repositories {
mavenCentral()
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
implementation("net.dv8tion:JDA:5.0.0-alpha.20")
tasks.getByName<Test>("test") {
useJUnitPlatform()
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "de.limited_dev.lil_judd.Main"
// To add all of the dependencies
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
include(dependency("net.dv8tion:JDA:5.0.0-alpha.20"))
//include(dependency("com.sedmelluq:lavaplayer:1.3.77"))
tasks.withType<JavaCompile>{
options.encoding = "UTF-8"
java{
sourceCompatibility = org.gradle.api.JavaVersion.VERSION_17
targetCompatibility = org.gradle.api.JavaVersion.VERSION_17