Cherry pick the banglets and such from wip-l1summercoat, this will be the basis for...
[SquirrelJME.git] / buildSrc / src / main / java / cc / squirreljme / plugin / general / FossilUserTask.java
blob42f6667a81c50243b19a32d787d7e889a03ec5ee
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc.squirreljme.plugin.general;
12 import cc.squirreljme.plugin.util.FossilExe;
13 import javax.inject.Inject;
14 import org.gradle.api.DefaultTask;
16 /**
17 * Prints the current fossil user.
19 * @since 2020/06/27
21 public class FossilUserTask
22 extends DefaultTask
24 /**
25 * Initializes the task.
27 * @param __exeTask The executable task.
28 * @since 2020/06/27
30 @Inject
31 public FossilUserTask(FossilExeTask __exeTask)
33 // Set details of this task
34 this.setGroup("squirreljmeGeneral");
35 this.setDescription("Prints the current Fossil user.");
37 // The executable task must run first
38 this.dependsOn(__exeTask);
40 // Fossil must exist
41 this.onlyIf(__task -> FossilExe.isAvailable(false));
43 // Action to perform
44 this.doLast(new FossilUserTaskAction());