plugins { id("com.github.johnrengelman.shadow") version "7.1.2" id("commons.library") } dependencies { shadow(implementation("io.gitlab.jfronny:gson:2.11-SNAPSHOT")!!) implementation(project(":")) testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.0") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0") } tasks.shadowJar { configurations.clear() configurations.add(project.configurations.shadow.get()) archiveClassifier.set("") relocate("com.google.gson", "io.gitlab.jfronny.gson") } publishing { publications { create("maven") { groupId = "io.gitlab.jfronny" artifactId = "commons-gson" project.shadow.component(this) pom.withXml { val l = asElement().getElementsByTagName("dependency"); for (i in 0 until l.length) { l.item(i).parentNode.removeChild(l.item(i)) } } } } }