Skip to content

Commit 0b5bff1

Browse files
committed
Fix plugins not using ToolsExtension failing build
1 parent 261a4a4 commit 0b5bff1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

gradleutils-shared/src/main/java/net/minecraftforge/gradleutils/shared/EnhancedPlugin.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public abstract class EnhancedPlugin<T> implements Plugin<T>, EnhancedPluginAddi
3333
private final @Nullable String toolsExtName;
3434

3535
private @UnknownNullability T target;
36-
private ToolsExtensionImpl tools;
36+
private ToolsExtensionImpl tools = this.getObjects().newInstance(ToolsExtensionImpl.class);
3737
private final EnhancedProblems problemsInternal;
3838

3939
/// The object factory provided by Gradle services.
@@ -99,8 +99,6 @@ public final void apply(T target) {
9999

100100
if (this.toolsExtName != null && target instanceof ExtensionAware)
101101
this.tools = ((ExtensionAware) target).getExtensions().create(this.toolsExtName, ToolsExtensionImpl.class);
102-
else
103-
this.tools = this.getObjects().newInstance(ToolsExtensionImpl.class);
104102
}
105103

106104
/// Called when this plugin is applied to do setup work.

0 commit comments

Comments
 (0)