diff --git a/src/main/java/net/neoforged/moddevgradle/internal/IdeIntegration.java b/src/main/java/net/neoforged/moddevgradle/internal/IdeIntegration.java index af94cb4..7654dcc 100644 --- a/src/main/java/net/neoforged/moddevgradle/internal/IdeIntegration.java +++ b/src/main/java/net/neoforged/moddevgradle/internal/IdeIntegration.java @@ -88,7 +88,7 @@ boolean shouldUseCombinedSourcesAndClassesArtifact() { /** * Registers a task to be run when the IDE reloads the Gradle project. */ - public final void runTaskOnProjectSync(TaskProvider task) { + public final void runTaskOnProjectSync(Object task) { ideSyncTask.configure(ideSyncTask -> ideSyncTask.dependsOn(task)); } diff --git a/src/main/java/net/neoforged/moddevgradle/internal/ModDevPlugin.java b/src/main/java/net/neoforged/moddevgradle/internal/ModDevPlugin.java index 5226719..f8779a8 100644 --- a/src/main/java/net/neoforged/moddevgradle/internal/ModDevPlugin.java +++ b/src/main/java/net/neoforged/moddevgradle/internal/ModDevPlugin.java @@ -151,6 +151,7 @@ public void apply(Project project) { accessTransformers.extension, interfaceInjectionData.extension ); + ideIntegration.runTaskOnProjectSync(extension.getIdeSyncTasks()); var dependencyFactory = project.getDependencyFactory(); // When a NeoForge version is specified, we use the dependencies published by that, and otherwise @@ -210,6 +211,7 @@ public void apply(Project project) { task.getNeoFormArtifact().set(getNeoFormDataDependencyNotation(extension)); task.getAdditionalResults().putAll(extension.getAdditionalMinecraftArtifacts()); }); + ideIntegration.runTaskOnProjectSync(createArtifacts); var downloadAssets = tasks.register("downloadAssets", DownloadAssets.class, task -> { // Not in the internal group in case someone wants to "preload" the asset before they go offline