@@ -43,13 +43,9 @@ configurations {
4343
4444 canBe(consumed = true , resolved = false )
4545 }
46- create(" publishedApi" ) {
47- canBe(consumed = true , resolved = false )
48- }
49- create(" publishedRuntime" ) {
50- canBe(consumed = true , resolved = false )
51- }
52- create(" publishedSources" ) {
46+ create(" sourcesJar" ) {
47+ description = " The remapped and shadowed sources of the main mod"
48+
5349 canBe(consumed = true , resolved = false )
5450 }
5551
@@ -61,8 +57,6 @@ configurations {
6157 canBe(consumed = false , resolved = true )
6258 }
6359
64- val liblib = named(" liblib" ) // liblib is already created by the module plugin
65-
6660 val includeApi = create(" includeApi" ) {
6761 description = " Jar-in-jar 'api' dependencies"
6862
@@ -76,7 +70,7 @@ configurations {
7670 }
7771
7872 named(" api" ) {
79- extendsFrom(liblib.get(), includeApi, shade)
73+ extendsFrom(includeApi, shade)
8074 }
8175 named(" include" ) {
8276 extendsFrom(includeApi, includeImplementation)
@@ -245,6 +239,7 @@ artifacts {
245239 add(" namedElements" , shadowJar)
246240 add(" modJar" , remapJar)
247241 add(" testModJar" , remapTestJar)
242+ add(" sourcesJar" , sourcesJar)
248243}
249244
250245// endregion // Build configuration
@@ -253,19 +248,13 @@ artifacts {
253248/* region == Publishing == */
254249
255250if (project.name != " testcore" ) {
256- artifacts {
257- add(" publishedApi" , remapJar)
258- add(" publishedRuntime" , remapJar)
259- add(" publishedSources" , sourcesJar)
260- }
261-
262- module.component.addVariantsFromConfiguration(configurations[" publishedApi" ]) {
251+ module.component.addVariantsFromConfiguration(configurations[" modJar" ]) {
263252 mapToMavenScope(" compile" )
264253 }
265- module.component.addVariantsFromConfiguration(configurations[" publishedRuntime " ]) {
254+ module.component.addVariantsFromConfiguration(configurations[" modJar " ]) {
266255 mapToMavenScope(" runtime" )
267256 }
268- module.component.addVariantsFromConfiguration(configurations[" publishedSources " ]) {
257+ module.component.addVariantsFromConfiguration(configurations[" sourcesJar " ]) {
269258 }
270259
271260 publishing {
0 commit comments