fix: merge common resources via sourceSets, bundle only classes in jar
Adds common's resources as a source dir so they're available during runClient, and bundles only classesDirs in the jar to avoid duplicates. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b46282d294
commit
0fe333b7be
@@ -31,11 +31,6 @@ dependencies {
|
||||
implementation(project(":common"))
|
||||
}
|
||||
|
||||
tasks.named<Jar>("jar") {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output)
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
inputs.property("version", project.version)
|
||||
inputs.property("minecraft_version", minecraftVersion)
|
||||
@@ -63,6 +58,8 @@ java {
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${base.archivesName.get()}" }
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@ dependencies {
|
||||
implementation(project(":common"))
|
||||
}
|
||||
|
||||
tasks.named<Jar>("jar") {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output)
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
inputs.property("version", project.version)
|
||||
inputs.property("minecraft_version", minecraftVersion)
|
||||
@@ -63,6 +58,8 @@ java {
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${base.archivesName.get()}" }
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@ dependencies {
|
||||
implementation(project(":common"))
|
||||
}
|
||||
|
||||
tasks.named<Jar>("jar") {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output)
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
inputs.property("version", project.version)
|
||||
inputs.property("minecraft_version", minecraftVersion)
|
||||
@@ -63,6 +58,8 @@ java {
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${base.archivesName.get()}" }
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@ dependencies {
|
||||
implementation(project(":common"))
|
||||
}
|
||||
|
||||
tasks.named<Jar>("jar") {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output)
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
inputs.property("version", project.version)
|
||||
inputs.property("minecraft_version", minecraftVersion)
|
||||
@@ -63,6 +58,8 @@ java {
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
dependsOn(project(":common").tasks.named("classes"))
|
||||
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${base.archivesName.get()}" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user