mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-01 21:17:46 -05:00
Remove "namedElements" when debof (#1435)
This commit is contained in:
@@ -149,8 +149,10 @@ public abstract class CompileConfiguration implements Runnable {
|
||||
|
||||
finalizedBy("eclipse", "genEclipseRuns");
|
||||
|
||||
// Add the "dev" jar to the "namedElements" configuration
|
||||
getProject().artifacts(artifactHandler -> artifactHandler.add(Configurations.NAMED_ELEMENTS, getTasks().named("jar")));
|
||||
if (!extension.disableObfuscation()) {
|
||||
// Add the "dev" jar to the "namedElements" configuration
|
||||
getProject().artifacts(artifactHandler -> artifactHandler.add(Configurations.NAMED_ELEMENTS, getTasks().named("jar")));
|
||||
}
|
||||
|
||||
// Ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||
// this fixes some edge cases with special characters not displaying correctly
|
||||
|
||||
@@ -126,15 +126,15 @@ public abstract class LoomConfigurations implements Runnable {
|
||||
});
|
||||
});
|
||||
|
||||
registerNonTransitive(Constants.Configurations.MAPPING_CONSTANTS, Role.RESOLVABLE);
|
||||
|
||||
register(Constants.Configurations.NAMED_ELEMENTS, Role.CONSUMABLE).configure(configuration -> {
|
||||
configuration.extendsFrom(getConfigurations().getByName(JavaPlugin.API_CONFIGURATION_NAME));
|
||||
});
|
||||
|
||||
extendsFrom(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME, Constants.Configurations.MAPPING_CONSTANTS);
|
||||
|
||||
if (!extension.disableObfuscation()) {
|
||||
registerNonTransitive(Constants.Configurations.MAPPING_CONSTANTS, Role.RESOLVABLE);
|
||||
|
||||
register(Constants.Configurations.NAMED_ELEMENTS, Role.CONSUMABLE).configure(configuration -> {
|
||||
configuration.extendsFrom(getConfigurations().getByName(JavaPlugin.API_CONFIGURATION_NAME));
|
||||
});
|
||||
|
||||
extendsFrom(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME, Constants.Configurations.MAPPING_CONSTANTS);
|
||||
|
||||
register(Constants.Configurations.MAPPINGS, Role.RESOLVABLE);
|
||||
register(Constants.Configurations.MAPPINGS_FINAL, Role.RESOLVABLE);
|
||||
extendsFrom(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME, Constants.Configurations.MAPPINGS_FINAL);
|
||||
|
||||
@@ -146,7 +146,9 @@ public final class SourceSetHelper {
|
||||
|
||||
// Add dev jars from dependency projects if the source set is "main".
|
||||
if (forExport && SourceSet.MAIN_SOURCE_SET_NAME.equals(reference.sourceSet().getName()) && GradleUtils.isLoomCompanionProject(reference.project())) {
|
||||
String configurationName = GradleUtils.isLoomProject(reference.project())
|
||||
boolean isLoom = GradleUtils.isLoomProject(reference.project());
|
||||
boolean isDebof = isLoom && LoomGradleExtension.get(reference.project()).disableObfuscation();
|
||||
String configurationName = isLoom && !isDebof
|
||||
? Constants.Configurations.NAMED_ELEMENTS : JavaPlugin.RUNTIME_ELEMENTS_CONFIGURATION_NAME;
|
||||
final Configuration namedElements = reference.project().getConfigurations().getByName(configurationName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user