Skip to content

Commit

Permalink
Mark tasks as using service
Browse files Browse the repository at this point in the history
Communicates to Gradle that these tasks make use of the service.

Fixes #108
  • Loading branch information
ajoberstar committed Feb 18, 2024
1 parent a5f189b commit 209a9f5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ private TaskProvider<GitPublishReset> 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());
Expand Down Expand Up @@ -96,6 +97,7 @@ private TaskProvider<GitPublishCommit> 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());
Expand All @@ -106,6 +108,7 @@ private TaskProvider<GitPublishPush> 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());
});
Expand Down

0 comments on commit 209a9f5

Please sign in to comment.