Skip to content

Commit e6008d5

Browse files
authored
Fix reobfuscate always using the configurations of the main source set (#256)
1 parent d84205d commit e6008d5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/legacy/java/net/neoforged/moddevgradle/legacyforge/dsl/ObfuscationExtension.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.gradle.api.component.ConfigurationVariantDetails;
2020
import org.gradle.api.file.FileCollection;
2121
import org.gradle.api.file.RegularFileProperty;
22-
import org.gradle.api.plugins.JavaPlugin;
2322
import org.gradle.api.provider.Provider;
2423
import org.gradle.api.tasks.SourceSet;
2524
import org.gradle.api.tasks.TaskProvider;
@@ -123,7 +122,7 @@ public TaskProvider<RemapJar> reobfuscate(TaskProvider<? extends AbstractArchive
123122
// Replace the publication of the jar task with the reobfuscated jar
124123
var configurations = project.getConfigurations();
125124
var java = (AdhocComponentWithVariants) project.getComponents().getByName("java");
126-
for (var configurationName : List.of(JavaPlugin.RUNTIME_ELEMENTS_CONFIGURATION_NAME, JavaPlugin.API_ELEMENTS_CONFIGURATION_NAME)) {
125+
for (var configurationName : List.of(sourceSet.getRuntimeElementsConfigurationName(), sourceSet.getApiElementsConfigurationName())) {
127126
var config = configurations.getByName(configurationName);
128127
// Mark the original configuration as NAMED to be able to disambiguate between it and the reobfuscated jar,
129128
// this is used for example by the JarJar configuration.

0 commit comments

Comments
 (0)