Skip to content

Commit d4c8d5a

Browse files
committed
Remove Gradle capability and attribute stuff
1 parent 2069ad1 commit d4c8d5a

6 files changed

Lines changed: 1 addition & 96 deletions

File tree

build-logic/src/main/groovy/multiloader-common.gradle

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,7 @@ repositories {
4040
}
4141
}
4242

43-
// Declare capabilities on the outgoing configurations.
44-
// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component
4543
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
46-
configurations."$variant".outgoing {
47-
capability("$group:${project.name}:$version")
48-
capability("$group:${base.archivesName.get()}:$version")
49-
capability("$group:$mod_id-${project.name}-${libs.minecraft.get().version}:$version")
50-
capability("$group:$mod_id:$version")
51-
}
5244
publishing.publications.configureEach {
5345
suppressPomMetadataWarningsFor(variant)
5446
}

build-logic/src/main/groovy/multiloader-loader.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@ configurations {
1515
}
1616

1717
dependencies {
18-
compileOnly(project(':common')) {
19-
capabilities {
20-
requireCapability "$group:$mod_id"
21-
}
22-
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
23-
attributes {
24-
attribute(loaderAttribute, 'common')
25-
}
26-
}
18+
compileOnly(project(':common'))
2719
commonJava project(path: ':common', configuration: 'commonJava')
2820
commonResources project(path: ':common', configuration: 'commonResources')
2921
commonGeneratedResources project(path: ':common', configuration: 'commonGeneratedResources')

common/build.gradle

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,3 @@ artifacts {
4949
commonGeneratedResources sourceSets.generated.resources.sourceDirectories.singleFile
5050
}
5151

52-
// Implement mcgradleconventions loader attribute
53-
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
54-
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
55-
configurations.named("$variant") {
56-
attributes {
57-
attribute(loaderAttribute, 'common')
58-
}
59-
}
60-
}
61-
sourceSets.configureEach {
62-
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant->
63-
configurations.named("$variant") {
64-
attributes {
65-
attribute(loaderAttribute, 'common')
66-
}
67-
}
68-
}
69-
}

fabric/build.gradle

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,6 @@ loom {
5858
}
5959
}
6060

61-
// Implement mcgradleconventions loader attribute
62-
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
63-
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements', 'includeInternal', 'modCompileClasspath'].each { variant ->
64-
configurations.named("$variant") {
65-
attributes {
66-
attribute(loaderAttribute, 'fabric')
67-
}
68-
}
69-
}
70-
sourceSets.configureEach {
71-
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant->
72-
configurations.named("$variant") {
73-
attributes {
74-
attribute(loaderAttribute, 'fabric')
75-
}
76-
}
77-
}
78-
}
79-
loom.remapConfigurations.configureEach {
80-
configurations.named(it.name) {
81-
attributes {
82-
attribute(loaderAttribute, 'fabric')
83-
}
84-
}
85-
}
8661

8762
tasks.register('curseforge', TaskPublishCurseForge) {
8863
dependsOn('build')

forge/build.gradle

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -139,21 +139,3 @@ sourceSets.each {
139139
it.java.destinationDirectory = dir
140140
}
141141

142-
// Implement mcgradleconventions loader attribute
143-
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
144-
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
145-
configurations.named("$variant") {
146-
attributes {
147-
attribute(loaderAttribute, 'forge')
148-
}
149-
}
150-
}
151-
sourceSets.configureEach {
152-
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant->
153-
configurations.named("$variant") {
154-
attributes {
155-
attribute(loaderAttribute, 'forge')
156-
}
157-
}
158-
}
159-
}

neoforge/build.gradle

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,3 @@ if (neoForgeSnapshotUrl != null && !neoForgeSnapshotUrl.isBlank()) {
9595
}
9696
}
9797

98-
// Implement mcgradleconventions loader attribute
99-
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
100-
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
101-
configurations.named("$variant") {
102-
attributes {
103-
attribute(loaderAttribute, 'neoforge')
104-
}
105-
}
106-
}
107-
sourceSets.configureEach {
108-
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName, it.getTaskName(null, 'jarJar')].each { variant->
109-
configurations.named("$variant") {
110-
attributes {
111-
attribute(loaderAttribute, 'neoforge')
112-
}
113-
}
114-
}
115-
}

0 commit comments

Comments
 (0)