Skip to content

Commit

Permalink
Fix #1740
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Oct 26, 2024
1 parent adf5fd1 commit 659f87a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,17 @@ publishing {
publication.artifactId = rootProject.name + "-" + projectName + "-fabric"
project.afterEvaluate {
def project = project(":" + projectName)
publication.artifact(project.fakeJar) { classifier null }
def normalArtifact, sourceArtifact
publication.artifact(project.fakeJar) { classifier null; normalArtifact = it }
def remapSourcesJarTask = project.remapSourcesJar
publication.artifact(remapSourcesJarTask) {
builtBy remapSourcesJarTask
classifier "sources"
sourceArtifact = it
}

// Hack to inherit the dependencies without inheriting the artifacts
publication.setArtifacts(publication.artifacts)
from components.java
publication.setArtifacts([normalArtifact, sourceArtifact])
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,16 @@ publishing {
project.afterEvaluate {
def project = project(":" + projectName)
remapSrg.inputFile = project.fakeForgeJar.archiveFile
publication.artifact(remapSrg) { classifier null }
def normalArtifact, sourceArtifact
publication.artifact(remapSrg) { classifier null; normalArtifact = it }
publication.artifact(remapSrgSourcesJar) {
builtBy remapSrgSourcesJar
classifier "sources"
sourceArtifact = it
}

// Hack to inherit the dependencies without inheriting the artifacts
publication.setArtifacts(publication.artifacts)
from components.java
publication.setArtifacts([normalArtifact, sourceArtifact])
}
}
}
Expand Down

0 comments on commit 659f87a

Please sign in to comment.