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

org.projen.UpgradeDependencies Maven / Gradle / Ivy

The newest version!
package org.projen;

/**
 * (experimental) Upgrade node project dependencies.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.34.0 (build 9b72778)", date = "2021-09-05T18:03:08.336Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = org.projen.$Module.class, fqn = "projen.UpgradeDependencies")
public class UpgradeDependencies extends org.projen.Component {

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

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

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

    /**
     * @param project This parameter is required.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public UpgradeDependencies(final @org.jetbrains.annotations.NotNull org.projen.NodeProject 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) The workflow that executes the upgrade.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public @org.jetbrains.annotations.Nullable org.projen.github.GithubWorkflow getWorkflow() {
        return software.amazon.jsii.Kernel.get(this, "workflow", software.amazon.jsii.NativeType.forClass(org.projen.github.GithubWorkflow.class));
    }

    /**
     * (experimental) A fluent builder for {@link org.projen.UpgradeDependencies}.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        /**
         * @return a new instance of {@link Builder}.
         * @param project This parameter is required.
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public static Builder create(final org.projen.NodeProject project) {
            return new Builder(project);
        }

        private final org.projen.NodeProject project;
        private org.projen.UpgradeDependenciesOptions.Builder options;

        private Builder(final org.projen.NodeProject project) {
            this.project = project;
        }

        /**
         * (experimental) List of package names to exclude during the upgrade.
         * 

* Default: - Nothing is excluded. *

* @return {@code this} * @param exclude List of package names to exclude during the upgrade. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder exclude(final java.util.List exclude) { this.options().exclude(exclude); return this; } /** * (experimental) Whether or not to ignore projen upgrades. *

* Default: true *

* @return {@code this} * @param ignoreProjen Whether or not to ignore projen upgrades. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder ignoreProjen(final java.lang.Boolean ignoreProjen) { this.options().ignoreProjen(ignoreProjen); return this; } /** * (experimental) List of package names to include during the upgrade. *

* Default: - Everything is included. *

* @return {@code this} * @param include List of package names to include during the upgrade. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder include(final java.util.List include) { this.options().include(include); return this; } /** * (experimental) Title of the pull request to use (should be all lower-case). *

* Default: "upgrade dependencies" *

* @return {@code this} * @param pullRequestTitle Title of the pull request to use (should be all lower-case). This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder pullRequestTitle(final java.lang.String pullRequestTitle) { this.options().pullRequestTitle(pullRequestTitle); return this; } /** * (experimental) The name of the task that will be created. *

* This will also be the workflow name. *

* Default: "upgrade". *

* @return {@code this} * @param taskName The name of the task that will be created. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder taskName(final java.lang.String taskName) { this.options().taskName(taskName); return this; } /** * (experimental) Include a github workflow for creating PR's that upgrades the required dependencies, either by manual dispatch, or by a schedule. *

* If this is false, only a local projen task is created, which can be executed manually to * upgrade the dependencies. *

* Default: - true for root projects, false for sub-projects. *

* @return {@code this} * @param workflow Include a github workflow for creating PR's that upgrades the required dependencies, either by manual dispatch, or by a schedule. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder workflow(final java.lang.Boolean workflow) { this.options().workflow(workflow); return this; } /** * (experimental) Options for the github workflow. *

* Only applies if workflow is true. *

* Default: - default options. *

* @return {@code this} * @param workflowOptions Options for the github workflow. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder workflowOptions(final org.projen.UpgradeDependenciesWorkflowOptions workflowOptions) { this.options().workflowOptions(workflowOptions); return this; } /** * @returns a newly built instance of {@link org.projen.UpgradeDependencies}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public org.projen.UpgradeDependencies build() { return new org.projen.UpgradeDependencies( this.project, this.options != null ? this.options.build() : null ); } private org.projen.UpgradeDependenciesOptions.Builder options() { if (this.options == null) { this.options = new org.projen.UpgradeDependenciesOptions.Builder(); } return this.options; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy