Class StonecutterController
-
- All Implemented Interfaces:
-
dev.kikugie.stonecutter.StonecutterConfiguration
public class StonecutterController implements StonecutterConfiguration
Runs for
stonecutter.gradlefile, applying project configurations to versions and generating versioned tasks.
-
-
Field Summary
Fields Modifier and Type Field Description private final StonecutterProjectcurrentprivate final List<StonecutterProject>versionsprivate final List<Project>projectsprivate final Class<ChiseledTask>chiseledprivate Booleandebug
-
Method Summary
Modifier and Type Method Description final StonecutterProjectgetCurrent()Project assigned by stonecutter.active "...".final List<StonecutterProject>getVersions()final List<Project>getProjects()All projects registered by StonecutterSettings. final Class<ChiseledTask>getChiseled()Chiseled task type accessor to avoid imports. BooleangetDebug()Enables Stonecutter debugging utilities. UnitsetDebug(Boolean debug)Enables Stonecutter debugging utilities. final Unitactive(String str)Assigns the active version to this project. final UnitregisterChiseled(TaskProvider<?> provider)Registers a ChiseledTask that delegates to the created task. final UnitconfigureEach(Action<StonecutterBuild> action)Allows accessing StonecutterBuild in the controller to organize the configuration. Unitswap(String identifier, String replacement)Creates a swap id. Unitconst(String identifier, Boolean value)Creates a constant accessible in stonecutter conditions. Unitdependency(String identifier, String version)Adds a dependency to the semver checks. Unitexclude(Path path)Excludes a file or directory from being processed. Unitexclude(String path)Excludes a file or directory from being processed. -
Methods inherited from class dev.kikugie.stonecutter.StonecutterConfiguration
comp, compare, const, consts, consts, debug, dependencies, dependencies, dependency, eval, exclude, swap, swaps, swaps -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getCurrent
final StonecutterProject getCurrent()
Project assigned by
stonecutter.active "...".
-
getVersions
final List<StonecutterProject> getVersions()
-
getProjects
final List<Project> getProjects()
All projects registered by StonecutterSettings.
-
getChiseled
final Class<ChiseledTask> getChiseled()
Chiseled task type accessor to avoid imports.
-
getDebug
Boolean getDebug()
Enables Stonecutter debugging utilities.
Currently, it creates human-readable ASTs in the cache folder and adds stack traces to reported exceptions.
-
setDebug
Unit setDebug(Boolean debug)
Enables Stonecutter debugging utilities.
Currently, it creates human-readable ASTs in the cache folder and adds stack traces to reported exceptions.
-
active
final Unit active(String str)
Assigns the active version to this project.
Do not call on your own.
- Parameters:
str- Project name
-
registerChiseled
final Unit registerChiseled(TaskProvider<?> provider)
Registers a ChiseledTask that delegates to the created task.
- Parameters:
provider- Delegate task provider
-
configureEach
final Unit configureEach(Action<StonecutterBuild> action)
Allows accessing StonecutterBuild in the controller to organize the configuration.
- Parameters:
action- Versioned configuration action
-
swap
Unit swap(String identifier, String replacement)
Creates a swap id.
- Parameters:
identifier- Swap namereplacement- Replacement string
-
const
Unit const(String identifier, Boolean value)
Creates a constant accessible in stonecutter conditions.
- Parameters:
identifier- Constant namevalue- Boolean value
-
dependency
Unit dependency(String identifier, String version)
Adds a dependency to the semver checks.
- Parameters:
identifier- Dependency nameversion- Dependency version to check against in semantic version format
-
exclude
Unit exclude(Path path)
Excludes a file or directory from being processed.
- Parameters:
path- Absolute path to the file.
-
-
-
-