Skip to content

Commit

Permalink
exclude compileOnly and runtime deps for shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Dec 22, 2021
1 parent 52db53f commit 6bb3d6e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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>("test") {
Expand All @@ -46,7 +46,7 @@ tasks.getByName<Test>("test") {
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.github.dunctebot"
groupId = "com.dunctebot"
artifactId = "lavalink"
version = "$pluginVersion"

Expand All @@ -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") {
Expand All @@ -76,12 +80,15 @@ tasks {
shadowJar {
archiveBaseName.set(archivesBaseName)
archiveClassifier.set("")

configurations = listOf(impl)
}
build {
dependsOn(processResources)
dependsOn(compileJava)
dependsOn(shadowJar)
}

publish {
dependsOn(publishToMavenLocal)
}
Expand Down

0 comments on commit 6bb3d6e

Please sign in to comment.