From 6bb3d6ea2a9bdd21c40d2aef74a24e72398ab118 Mon Sep 17 00:00:00 2001 From: duncte123 Date: Wed, 22 Dec 2021 12:41:59 +0100 Subject: [PATCH] exclude compileOnly and runtime deps for shadow --- build.gradle.kts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bd29da6..8fcc692 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ plugins { application `java-library` `maven-publish` - id("com.github.johnrengelman.shadow") version "7.1.0" + id("com.github.johnrengelman.shadow") version "7.1.1" id("com.github.breadmoirai.github-release") version "2.2.12" } @@ -36,7 +36,7 @@ dependencies { compileOnly("dev.arbjerg.lavalink:plugin-api:0.6.0") // for testing - // runtimeOnly("com.github.freyacodes.lavalink:Lavalink-Server:feature~plugins-SNAPSHOT") + runtimeOnly("com.github.freyacodes.lavalink:Lavalink-Server:feature~plugins-SNAPSHOT") } tasks.getByName("test") { @@ -46,7 +46,7 @@ tasks.getByName("test") { publishing { publications { create("maven") { - groupId = "com.github.dunctebot" + groupId = "com.dunctebot" artifactId = "lavalink" version = "$pluginVersion" @@ -55,6 +55,10 @@ publishing { } } +// make sure that we can resolve the dependencies +val impl = project.configurations.implementation.get() +impl.isCanBeResolved = true + tasks { processResources { from("src/main/resources") { @@ -76,12 +80,15 @@ tasks { shadowJar { archiveBaseName.set(archivesBaseName) archiveClassifier.set("") + + configurations = listOf(impl) } build { dependsOn(processResources) dependsOn(compileJava) dependsOn(shadowJar) } + publish { dependsOn(publishToMavenLocal) }