jitpack.io
jitpack.io copied to clipboard
dependencies are not relocated when loading the repo into jitpack
Hello,
The repository compiles fine, there is no problem. The question is that I need to relocate a dependency and I use the shadowJar task, but jitpack doesn't seem to know which way the repo is compiling it so it ignores the task and doesn't relocate, is there any way to relocate a dependency when jitpack compiles the repo?
plugins {
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version ("7.1.2")
}
group = "${project.property("group")}"
version = "${project.property("version")}"
plugins.apply("maven-publish")
plugins.apply("com.github.johnrengelman.shadow")
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = project.name
version = "${project.version}"
from(components["java"])
}
}
}
repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
dependencies {
implementation(libs.shibacraftApi)
compileOnly(libs.spigot)
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
}
tasks {
assemble {
dependsOn(shadowJar)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
withType<JavaCompile> {
options.encoding = "UTF-8"
}
shadowJar {
val relocate = "net.shibacraft.simpleblockregen.libs"
relocate("net.shibacraft.api", "$relocate.shibacraftAPI")
minimize()
}
}
solved
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.