All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.aws.awsprototypingsdk.nxmonorepo.NxProject Maven / Gradle / Ivy

There is a newer version: 0.19.68
Show newest version
package software.aws.awsprototypingsdk.nxmonorepo;

/**
 * (experimental) Component which manages the project specific NX Config and is added to all NXMonorepo subprojects.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-03T02:16:17.255Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.nxmonorepo.$Module.class, fqn = "@aws-prototyping-sdk/nx-monorepo.NxProject")
public class NxProject extends io.github.cdklabs.projen.Component {

    protected NxProject(final software.amazon.jsii.JsiiObjectRef objRef) {
        super(objRef);
    }

    protected NxProject(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
        super(initializationMode);
    }

    /**
     * @param project This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public NxProject(final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.Project project) {
        super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
        software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(project, "project is required") });
    }

    /**
     * (experimental) Retrieves an instance of NXProject if one is associated to the given project, otherwise created a NXProject instance for the project.
     * 

* @param project project instance. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.nxmonorepo.NxProject ensure(final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.Project project) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.aws.awsprototypingsdk.nxmonorepo.NxProject.class, "ensure", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.nxmonorepo.NxProject.class), new Object[] { java.util.Objects.requireNonNull(project, "project is required") }); } /** * (experimental) Retrieves an instance of NXProject if one is associated to the given project. *

* @param project project instance. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static @org.jetbrains.annotations.Nullable software.aws.awsprototypingsdk.nxmonorepo.NxProject of(final @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.Project project) { return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.aws.awsprototypingsdk.nxmonorepo.NxProject.class, "of", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.nxmonorepo.NxProject.class), new Object[] { java.util.Objects.requireNonNull(project, "project is required") }); } /** * (experimental) Add input and output files to build target. *

* @param inputs Input files. * @param outputs Output files. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void addBuildTargetFiles(final @org.jetbrains.annotations.Nullable java.util.List inputs, final @org.jetbrains.annotations.Nullable java.util.List outputs) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { for (int __idx_fc5fd4 = 0; __idx_fc5fd4 < inputs.size(); __idx_fc5fd4++) { final java.lang.Object __val_fc5fd4 = inputs.get(__idx_fc5fd4); if ( !(__val_fc5fd4 instanceof java.lang.String) && !(__val_fc5fd4 instanceof software.aws.awsprototypingsdk.nxmonorepo.nx.IInput) && !(__val_fc5fd4.getClass().equals(software.amazon.jsii.JsiiObject.class)) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("inputs").append(".get(").append(__idx_fc5fd4).append(")") .append(" to be one of: java.lang.String, software.aws.awsprototypingsdk.nxmonorepo.nx.IInput; received ") .append(__val_fc5fd4.getClass()).toString()); } } } software.amazon.jsii.Kernel.call(this, "addBuildTargetFiles", software.amazon.jsii.NativeType.VOID, new Object[] { inputs, outputs }); } /** * (experimental) Add input and output files to build target. *

* @param inputs Input files. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void addBuildTargetFiles(final @org.jetbrains.annotations.Nullable java.util.List inputs) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { for (int __idx_fc5fd4 = 0; __idx_fc5fd4 < inputs.size(); __idx_fc5fd4++) { final java.lang.Object __val_fc5fd4 = inputs.get(__idx_fc5fd4); if ( !(__val_fc5fd4 instanceof java.lang.String) && !(__val_fc5fd4 instanceof software.aws.awsprototypingsdk.nxmonorepo.nx.IInput) && !(__val_fc5fd4.getClass().equals(software.amazon.jsii.JsiiObject.class)) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("inputs").append(".get(").append(__idx_fc5fd4).append(")") .append(" to be one of: java.lang.String, software.aws.awsprototypingsdk.nxmonorepo.nx.IInput; received ") .append(__val_fc5fd4.getClass()).toString()); } } } software.amazon.jsii.Kernel.call(this, "addBuildTargetFiles", software.amazon.jsii.NativeType.VOID, new Object[] { inputs }); } /** * (experimental) Add input and output files to build target. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void addBuildTargetFiles() { software.amazon.jsii.Kernel.call(this, "addBuildTargetFiles", software.amazon.jsii.NativeType.VOID); } /** * (experimental) Adds an implicit dependency between the dependant (this project) and dependee. *

* @param dependee project to add the implicit dependency on. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void addImplicitDependency(final @org.jetbrains.annotations.NotNull java.lang.Object... dependee) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { final java.util.List __dependee__asList = java.util.Arrays.asList(dependee); for (int __idx_43583d = 0; __idx_43583d < __dependee__asList.size(); __idx_43583d++) { final java.lang.Object __val_43583d = __dependee__asList.get(__idx_43583d); if ( !(__val_43583d instanceof java.lang.String) && !(__val_43583d instanceof io.github.cdklabs.projen.Project) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("dependee").append("[").append(__idx_43583d).append("]") .append(" to be one of: java.lang.String, io.github.cdklabs.projen.Project; received ") .append(__val_43583d.getClass()).toString()); } } } software.amazon.jsii.Kernel.call(this, "addImplicitDependency", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(dependee).toArray(Object[]::new)); } /** * (experimental) Add tag. *

* @param tags This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void addTag(final @org.jetbrains.annotations.NotNull java.lang.String... tags) { software.amazon.jsii.Kernel.call(this, "addTag", software.amazon.jsii.NativeType.VOID, java.util.Arrays.stream(tags).toArray(Object[]::new)); } /** * (experimental) Automatically infer targets based on project type. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void inferTargets() { software.amazon.jsii.Kernel.call(this, "inferTargets", software.amazon.jsii.NativeType.VOID); } /** * (experimental) Merge configuration into existing config. *

* @param config This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void merge(final @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.nxmonorepo.nx.ProjectConfig config) { software.amazon.jsii.Kernel.call(this, "merge", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(config, "config is required") }); } /** * (experimental) Set namedInputs helper. *

* @param name This parameter is required. * @param inputs This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setNamedInput(final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.NotNull java.util.List inputs) { software.amazon.jsii.Kernel.call(this, "setNamedInput", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(name, "name is required"), java.util.Objects.requireNonNull(inputs, "inputs is required") }); } /** * (experimental) Set targets helper. *

* @param name This parameter is required. * @param target This parameter is required. * @param includeDefaults */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setTarget(final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.nxmonorepo.nx.IProjectTarget target, final @org.jetbrains.annotations.Nullable java.lang.Object includeDefaults) { if (software.amazon.jsii.Configuration.getRuntimeTypeChecking()) { if ( !(includeDefaults instanceof java.lang.String) && !(includeDefaults instanceof java.lang.Boolean) ) { throw new IllegalArgumentException( new java.lang.StringBuilder("Expected ") .append("includeDefaults") .append(" to be one of: java.lang.String, java.lang.Boolean; received ") .append(includeDefaults.getClass()).toString()); } } software.amazon.jsii.Kernel.call(this, "setTarget", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(name, "name is required"), java.util.Objects.requireNonNull(target, "target is required"), includeDefaults }); } /** * (experimental) Set targets helper. *

* @param name This parameter is required. * @param target This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setTarget(final @org.jetbrains.annotations.NotNull java.lang.String name, final @org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.nxmonorepo.nx.IProjectTarget target) { software.amazon.jsii.Kernel.call(this, "setTarget", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(name, "name is required"), java.util.Objects.requireNonNull(target, "target is required") }); } /** * (experimental) Synthesizes files to the project output directory. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public void synthesize() { software.amazon.jsii.Kernel.call(this, "synthesize", software.amazon.jsii.NativeType.VOID); } /** * (experimental) Raw json file. *

* Attention: any overrides applied here will not be visible * in the properties and only included in final synthesized output, * and likely to override native handling. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull io.github.cdklabs.projen.JsonFile getFile() { return software.amazon.jsii.Kernel.get(this, "file", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.projen.JsonFile.class)); } /** * (experimental) Implicit dependencies. *

* @see https://nx.dev/reference/project-configuration#implicitdependencies */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.List getImplicitDependencies() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "implicitDependencies", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * (experimental) Implicit dependencies. *

* @see https://nx.dev/reference/project-configuration#implicitdependencies */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setImplicitDependencies(final @org.jetbrains.annotations.NotNull java.util.List value) { software.amazon.jsii.Kernel.set(this, "implicitDependencies", java.util.Objects.requireNonNull(value, "implicitDependencies is required")); } /** * (experimental) Explicit list of scripts for Nx to include. *

* @see https://nx.dev/reference/project-configuration#ignoring-package.json-scripts */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.List getIncludedScripts() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "includedScripts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * (experimental) Explicit list of scripts for Nx to include. *

* @see https://nx.dev/reference/project-configuration#ignoring-package.json-scripts */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setIncludedScripts(final @org.jetbrains.annotations.NotNull java.util.List value) { software.amazon.jsii.Kernel.set(this, "includedScripts", java.util.Objects.requireNonNull(value, "includedScripts is required")); } /** * (experimental) Named inputs. *

* @see https://nx.dev/reference/nx-json#inputs-&-namedinputs */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.Map getNamedInputs() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "namedInputs", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** * (experimental) Named inputs. *

* @see https://nx.dev/reference/nx-json#inputs-&-namedinputs */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setNamedInputs(final @org.jetbrains.annotations.NotNull java.util.Map value) { software.amazon.jsii.Kernel.set(this, "namedInputs", java.util.Objects.requireNonNull(value, "namedInputs is required")); } /** * (experimental) Project tag annotations. *

* @see https://nx.dev/reference/project-configuration#tags */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.List getTags() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * (experimental) Project tag annotations. *

* @see https://nx.dev/reference/project-configuration#tags */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setTags(final @org.jetbrains.annotations.NotNull java.util.List value) { software.amazon.jsii.Kernel.set(this, "tags", java.util.Objects.requireNonNull(value, "tags is required")); } /** * (experimental) Targets configuration. *

* @see https://nx.dev/reference/project-configuration */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.Map getTargets() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "targets", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** * (experimental) Targets configuration. *

* @see https://nx.dev/reference/project-configuration */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void setTargets(final @org.jetbrains.annotations.NotNull java.util.Map value) { software.amazon.jsii.Kernel.set(this, "targets", java.util.Objects.requireNonNull(value, "targets is required")); } }