diff --git a/src/main/java/org/ajoberstar/gradle/git/publish/GitPublishPlugin.java b/src/main/java/org/ajoberstar/gradle/git/publish/GitPublishPlugin.java index 58b1d6d..7a1d90f 100644 --- a/src/main/java/org/ajoberstar/gradle/git/publish/GitPublishPlugin.java +++ b/src/main/java/org/ajoberstar/gradle/git/publish/GitPublishPlugin.java @@ -69,6 +69,7 @@ private TaskProvider createResetTask(Project project, GitPublic return project.getTasks().register(getTaskName(publication, "Reset"), GitPublishReset.class, task -> { task.setGroup("publishing"); task.setDescription("Prepares a git repo for " + publication.getName() + " publication content to be generated."); + task.usesService(grgitService); task.getGrgitService().set(grgitService); task.getRepoUri().set(publication.getRepoUri()); task.getReferenceRepoUri().set(publication.getReferenceRepoUri()); @@ -96,6 +97,7 @@ private TaskProvider createCommitTask(Project project, GitPubl return project.getTasks().register(getTaskName(publication, "Commit"), GitPublishCommit.class, task -> { task.setGroup("publishing"); task.setDescription("Commits " + publication.getName() + " publication changes to be published to git."); + task.usesService(grgitService); task.getGrgitService().set(grgitService); task.getMessage().set(publication.getCommitMessage()); task.getSign().set(publication.getSign()); @@ -106,6 +108,7 @@ private TaskProvider createPushTask(Project project, GitPublicat return project.getTasks().register(getTaskName(publication, "Push"), GitPublishPush.class, task -> { task.setGroup("publishing"); task.setDescription("Pushes " + publication.getName() + " publication changes to git."); + task.usesService(grgitService); task.getGrgitService().set(grgitService); task.getBranch().set(publication.getBranch()); });