1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
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 cc
.squirreljme
.plugin
.multivm
.ident
.TargetClassifier
;
13 import org
.gradle
.api
.Task
;
14 import org
.gradle
.api
.specs
.Spec
;
17 * Check to see if the ROM is valid.
21 public class CheckRomShouldBuild
24 /** The classifier used. */
25 protected final TargetClassifier classifier
;
28 * Checks if a ROM should be built.
30 * @param __classifier The classifier used.
31 * @throws NullPointerException On null arguments.
34 public CheckRomShouldBuild(TargetClassifier __classifier
)
35 throws NullPointerException
37 if (__classifier
== null)
38 throw new NullPointerException("NARG");
40 this.classifier
= __classifier
;
48 public boolean isSatisfiedBy(Task __task
)
49 throws NullPointerException
52 throw new NullPointerException("NARG");
54 return this.classifier
.getVmType().hasRom(
55 this.classifier
.getBangletVariant());