@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-20T00:39:28.418Z") @Stability(value=Experimental) public class Project extends software.amazon.jsii.JsiiObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Project.Builder
(experimental) A fluent builder for
Project. |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TASK
(experimental) The name of the default task (the task executed when `projen` is run without arguments).
|
| Modifier | Constructor and Description |
|---|---|
protected |
Project(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Project(software.amazon.jsii.JsiiObjectRef objRef) |
|
Project(ProjectOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExcludeFromCleanup(String... globs)
(experimental) Exclude the matching files from pre-synth cleanup.
|
void |
addGitIgnore(String pattern)
(experimental) Adds a .gitignore pattern.
|
void |
addPackageIgnore(String _pattern)
(experimental) Exclude these files from the bundled package.
|
Task |
addTask(String name)
(experimental) Adds a new task to this project.
|
Task |
addTask(String name,
TaskOptions props)
(experimental) Adds a new task to this project.
|
void |
addTip(String message)
Deprecated.
- use `project.logger.info(message)` to show messages during synthesis
|
void |
annotateGenerated(String _glob)
(experimental) Consider a set of files as "generated".
|
Task |
getBuildTask() |
Task |
getCompileTask() |
List<Component> |
getComponents()
(experimental) Returns all the components within this project.
|
Task |
getDefaultTask()
(experimental) This is the "default" task, the one that executes "projen".
|
Dependencies |
getDeps()
(experimental) Project dependencies.
|
List<FileBase> |
getFiles()
(experimental) All files in this project.
|
GitAttributesFile |
getGitattributes()
(experimental) The .gitattributes file for this repository.
|
IgnoreFile |
getGitignore()
(experimental) .gitignore.
|
InitProject |
getInitProject()
(experimental) The options used when this project is bootstrapped via `projen new`.
|
Logger |
getLogger()
(experimental) Logging utilities.
|
String |
getName()
(experimental) Project name.
|
String |
getOutdir()
(experimental) Absolute output directory of this project.
|
Task |
getPackageTask() |
Project |
getParent()
(experimental) A parent project.
|
Task |
getPostCompileTask() |
Task |
getPreCompileTask() |
ProjectBuild |
getProjectBuild()
(experimental) Manages the build process of the project.
|
String |
getProjenCommand()
(experimental) The command to use in order to run the projen CLI.
|
Project |
getRoot()
(experimental) The root project.
|
Tasks |
getTasks()
(experimental) Project tasks.
|
Task |
getTestTask() |
void |
postSynthesize()
(experimental) Called after all components are synthesized.
|
void |
preSynthesize()
(experimental) Called before all components are synthesized.
|
Task |
removeTask(String name)
(experimental) Removes a task from a project.
|
String |
runTaskCommand(Task task)
(experimental) Returns the shell command to execute in order to run a task.
|
void |
synth()
(experimental) Synthesize all project files into `outdir`.
|
FileBase |
tryFindFile(String filePath)
(experimental) Finds a file at the specified relative path within this project and all its subprojects.
|
JsonFile |
tryFindJsonFile(String filePath)
Deprecated.
use `tryFindObjectFile`
|
ObjectFile |
tryFindObjectFile(String filePath)
(experimental) Finds an object file (like JsonFile, YamlFile, etc.) by name.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Experimental) public static final String DEFAULT_TASK
Normally this task should synthesize the project files.
protected Project(software.amazon.jsii.JsiiObjectRef objRef)
protected Project(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Project(@NotNull
ProjectOptions options)
options - This parameter is required.@Stability(value=Experimental)
public void addExcludeFromCleanup(@NotNull
String... globs)
Can be used when, for example, some source files include the projen marker and we don't want them to be erased during synth.
globs - The glob patterns to match. This parameter is required.@Stability(value=Experimental)
public void addGitIgnore(@NotNull
String pattern)
pattern - The glob pattern to ignore. This parameter is required.@Stability(value=Experimental)
public void addPackageIgnore(@NotNull
String _pattern)
Implemented by project types based on the
packaging mechanism. For example, NodeProject delegates this to .npmignore.
_pattern - The glob pattern to exclude. This parameter is required.@Stability(value=Experimental) @NotNull public Task addTask(@NotNull String name, @Nullable TaskOptions props)
This will fail if the project already has a task with this name.
name - The task name to add. This parameter is required.props - Task properties.@Stability(value=Experimental) @NotNull public Task addTask(@NotNull String name)
This will fail if the project already has a task with this name.
name - The task name to add. This parameter is required.@Stability(value=Deprecated) @Deprecated public void addTip(@NotNull String message)
message - The message. This parameter is required.@Stability(value=Experimental)
public void annotateGenerated(@NotNull
String _glob)
This method is implemented by derived classes and used for example, to add git attributes to tell GitHub that certain files are generated.
_glob - the glob pattern to match (could be a file path). This parameter is required.@Stability(value=Experimental) public void postSynthesize()
Order is not guaranteed.
@Stability(value=Experimental) public void preSynthesize()
@Stability(value=Experimental) @Nullable public Task removeTask(@NotNull String name)
name - The name of the task to remove. This parameter is required.@Stability(value=Experimental) @NotNull public String runTaskCommand(@NotNull Task task)
By default, this is npx projen@<version> <task>
task - The task for which the command is required. This parameter is required.@Stability(value=Experimental) public void synth()
@Stability(value=Experimental) @Nullable public FileBase tryFindFile(@NotNull String filePath)
filePath - The file path. This parameter is required.@Stability(value=Deprecated) @Deprecated @Nullable public JsonFile tryFindJsonFile(@NotNull String filePath)
filePath - The file path. This parameter is required.@Stability(value=Experimental) @Nullable public ObjectFile tryFindObjectFile(@NotNull String filePath)
filePath - The file path. This parameter is required.@Stability(value=Experimental) @NotNull public Task getBuildTask()
@Stability(value=Experimental) @NotNull public Task getCompileTask()
@Stability(value=Experimental) @NotNull public List<Component> getComponents()
@Stability(value=Experimental) @NotNull public Task getDefaultTask()
@Stability(value=Experimental) @NotNull public Dependencies getDeps()
@Stability(value=Experimental) @NotNull public List<FileBase> getFiles()
@Stability(value=Experimental) @NotNull public GitAttributesFile getGitattributes()
@Stability(value=Experimental) @NotNull public IgnoreFile getGitignore()
@Stability(value=Experimental) @NotNull public Logger getLogger()
@Stability(value=Experimental) @NotNull public String getName()
@Stability(value=Experimental) @NotNull public String getOutdir()
@Stability(value=Experimental) @NotNull public Task getPackageTask()
@Stability(value=Experimental) @NotNull public Task getPostCompileTask()
@Stability(value=Experimental) @NotNull public Task getPreCompileTask()
@Stability(value=Experimental) @NotNull public ProjectBuild getProjectBuild()
@Stability(value=Experimental) @NotNull public String getProjenCommand()
@Stability(value=Experimental) @NotNull public Project getRoot()
@Stability(value=Experimental) @NotNull public Tasks getTasks()
@Stability(value=Experimental) @NotNull public Task getTestTask()
@Stability(value=Experimental) @Nullable public InitProject getInitProject()
It includes the original set of options passed to the CLI and also the JSII FQN of the project type.
@Stability(value=Experimental) @Nullable public Project getParent()
If undefined, this is the root project.
Copyright © 2021. All rights reserved.