If a test has variants, do not add the base test class because that will just cause...
[SquirrelJME.git] / buildSrc / src / main / java / cc / squirreljme / plugin / multivm / VMFullSuite.java
blob9179ed1b6a8e0e08807ef6c45968de2a4f55ae23
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.multivm;
12 import javax.inject.Inject;
13 import lombok.Getter;
14 import org.gradle.api.DefaultTask;
15 import org.gradle.api.tasks.Internal;
17 /**
18 * Task for running the full-suite of SquirrelJME.
20 * @since 2020/10/17
22 public class VMFullSuite
23 extends DefaultTask
24 implements VMExecutableTask
26 /** The source set used. */
27 @Internal
28 @Getter
29 public final String sourceSet;
31 /** The virtual machine type. */
32 @Internal
33 @Getter
34 public final VMSpecifier vmType;
36 /**
37 * Initializes the full suite task.
39 * @param __sourceSet The source set used.
40 * @param __vmType The virtual machine type.
41 * @throws NullPointerException On null arguments.
42 * @since 2020/10/17
44 @Inject
45 public VMFullSuite(String __sourceSet, VMSpecifier __vmType)
46 throws NullPointerException
48 if (__vmType == null || __sourceSet == null)
49 throw new NullPointerException("NARG");
51 this.sourceSet = __sourceSet;
52 this.vmType = __vmType;
54 // Runs the entire API/Library suite of SquirrelJME to run a given
55 // application
56 this.setGroup("squirreljmeGeneral");
57 this.setDescription("Runs the full suite of SquirrelJME Modules.");
59 // This always runs, no matter what
60 this.onlyIf(new AlwaysTrue());
61 this.getOutputs().upToDateWhen(new AlwaysFalse());
63 // This depends on everything!
64 this.dependsOn(
65 new VMFullSuiteDepends(this, __sourceSet, __vmType),
66 new VMEmulatorDependencies(this, __vmType));
68 // Actual running of everything
69 this.doLast(new VMFullSuiteTaskAction(__sourceSet, __vmType));