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 / CheckRomShouldBuild.java
blob0d8be6b310ca36287297bf701af70f0ed884261a
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 org.gradle.api.Task;
13 import org.gradle.api.specs.Spec;
15 /**
16 * Check to see if the ROM is valid.
18 * @since 2020/08/23
20 public class CheckRomShouldBuild
21 implements Spec<Task>
23 /** The virtual machine specifier. */
24 protected final VMSpecifier vmType;
26 /**
27 * Checks if a ROM should be built.
29 * @param __vmType The virtual machine type.
30 * @throws NullPointerException On null arguments.
31 * @since 2020/08/23
33 public CheckRomShouldBuild(VMSpecifier __vmType)
34 throws NullPointerException
36 if (__vmType == null)
37 throw new NullPointerException("NARG");
39 this.vmType = __vmType;
42 /**
43 * {@inheritDoc}
44 * @since 2020/08/23
46 @Override
47 public boolean isSatisfiedBy(Task __task)
48 throws NullPointerException
50 if (__task == null)
51 throw new NullPointerException("NARG");
53 return this.vmType.hasRom();