Skip to content

Commit 7dd3627

Browse files
committed
Merge remote-tracking branch 'origin/15.x-1.20.5' into 16.x-1.21
2 parents eaf9236 + f8bd895 commit 7dd3627

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

fabric/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,17 @@ publishing {
100100
publication.artifactId = rootProject.name + "-" + projectName + "-fabric"
101101
project.afterEvaluate {
102102
def project = project(":" + projectName)
103-
publication.artifact(project.fakeJar) { classifier null }
103+
def normalArtifact, sourceArtifact
104+
publication.artifact(project.fakeJar) { classifier null; normalArtifact = it }
104105
def remapSourcesJarTask = project.remapSourcesJar
105106
publication.artifact(remapSourcesJarTask) {
106107
builtBy remapSourcesJarTask
107108
classifier "sources"
109+
sourceArtifact = it
108110
}
109111

110-
// Hack to inherit the dependencies without inheriting the artifacts
111-
publication.setArtifacts(publication.artifacts)
112112
from components.java
113+
publication.setArtifacts([normalArtifact, sourceArtifact])
113114
}
114115
}
115116
}

forge/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,16 @@ publishing {
210210
project.afterEvaluate {
211211
def project = project(":" + projectName)
212212
remapSrg.inputFile = project.fakeForgeJar.archiveFile
213-
publication.artifact(remapSrg) { classifier null }
213+
def normalArtifact, sourceArtifact
214+
publication.artifact(remapSrg) { classifier null; normalArtifact = it }
214215
publication.artifact(remapSrgSourcesJar) {
215216
builtBy remapSrgSourcesJar
216217
classifier "sources"
218+
sourceArtifact = it
217219
}
218220

219-
// Hack to inherit the dependencies without inheriting the artifacts
220-
publication.setArtifacts(publication.artifacts)
221221
from components.java
222+
publication.setArtifacts([normalArtifact, sourceArtifact])
222223
}
223224
}
224225
}

neoforge/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,16 @@ publishing {
147147
project.afterEvaluate {
148148
def project = project(":" + projectName)
149149
remapMojang.inputFile = project.fakeForgeJar.archiveFile
150-
publication.artifact(remapMojang) { classifier null }
150+
def normalArtifact, sourceArtifact
151+
publication.artifact(remapMojang) { classifier null; normalArtifact = it }
151152
publication.artifact(remapMojangSourcesJar) {
152153
builtBy remapMojangSourcesJar
153154
classifier "sources"
155+
sourceArtifact = it
154156
}
155157

156-
// Hack to inherit the dependencies without inheriting the artifacts
157-
publication.setArtifacts(publication.artifacts)
158158
from components.java
159+
publication.setArtifacts([normalArtifact, sourceArtifact])
159160
}
160161
}
161162
}

0 commit comments

Comments
 (0)