Include api sources in common sources jar

This commit is contained in:
Nassim Jahnke 2023-11-06 20:04:45 +10:00
parent ffdddeeb0a
commit 2881fb18e0
8 changed files with 20 additions and 2 deletions

View File

@ -33,3 +33,5 @@ dependencies {
java {
withJavadocJar()
}
publishShadowJar()

View File

@ -21,8 +21,6 @@ tasks {
}
}
publishShadowJar()
fun ShadowJar.configureRelocations() {
relocate("com.google.gson", "com.viaversion.viaversion.libs.gson")
relocate("com.github.steveice10.opennbt", "com.viaversion.viaversion.libs.opennbt")

View File

@ -8,3 +8,5 @@ dependencies {
}
compileOnly(projects.compat.protocolsupportCompat)
}
publishShadowJar()

View File

@ -2,3 +2,5 @@ dependencies {
compileOnlyApi(projects.viaversionCommon)
compileOnly(libs.bungee)
}
publishShadowJar()

View File

@ -14,3 +14,9 @@ dependencies {
java {
withJavadocJar()
}
tasks.named<Jar>("sourcesJar") {
from(project(":viaversion-api").sourceSets.main.get().allSource)
}
publishShadowJar()

View File

@ -2,3 +2,5 @@ dependencies {
compileOnlyApi(projects.viaversionCommon)
compileOnly(libs.sponge)
}
publishShadowJar()

View File

@ -16,10 +16,12 @@ dependencies {
tasks {
shadowJar {
archiveClassifier.set("")
archiveFileName.set("ViaVersion-${project.version}.jar")
destinationDirectory.set(rootProject.projectDir.resolve("build/libs"))
}
sourcesJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
rootProject.subprojects.forEach { subproject ->
if (subproject == project) return@forEach
val platformSourcesJarTask = subproject.tasks.findByName("sourcesJar") as? Jar ?: return@forEach
@ -29,6 +31,8 @@ tasks {
}
}
publishShadowJar()
val branch = rootProject.branchName()
val baseVersion = project.version as String
val isRelease = !baseVersion.contains('-')

View File

@ -6,3 +6,5 @@ dependencies {
}
annotationProcessor(libs.velocity)
}
publishShadowJar()