Skip to content

Commit

Permalink
Run createArtifacts and ide sync tasks on ide sync (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n authored Oct 14, 2024
1 parent b0eff18 commit 197c94a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 197c94a

Please sign in to comment.