Package io.github.cdklabs.projen.awscdk
Class AwsCdkDepsOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.awscdk.AwsCdkDepsOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<AwsCdkDepsOptions>
- Enclosing interface:
- AwsCdkDepsOptions
@Stability(Experimental) public static final class AwsCdkDepsOptions.Builder extends Object implements software.amazon.jsii.Builder<AwsCdkDepsOptions>
A builder forAwsCdkDepsOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
dependencyType
@Stability(Experimental) public AwsCdkDepsOptions.Builder dependencyType(DependencyType dependencyType)
Sets the value ofAwsCdkDepsOptions.getDependencyType()- Parameters:
dependencyType- The type of dependency to use for runtime AWS CDK andconstructsmodules. This parameter is required. For libraries, use peer dependencies and for apps use runtime dependencies.- Returns:
this
-
cdkVersion
@Stability(Experimental) public AwsCdkDepsOptions.Builder cdkVersion(String cdkVersion)
Sets the value ofAwsCdkDepsCommonOptions.getCdkVersion()- Parameters:
cdkVersion- Minimum version of the AWS CDK to depend on. This parameter is required.- Returns:
this
-
cdkAssert
@Stability(Deprecated) @Deprecated public AwsCdkDepsOptions.Builder cdkAssert(Boolean cdkAssert)
Deprecated.TheSets the value ofAwsCdkDepsCommonOptions.getCdkAssert()- Parameters:
cdkAssert- Warning: NodeJS only. Install the- Returns:
this
-
cdkAssertions
@Stability(Experimental) public AwsCdkDepsOptions.Builder cdkAssertions(Boolean cdkAssertions)
Sets the value ofAwsCdkDepsCommonOptions.getCdkAssertions()- Parameters:
cdkAssertions- Install the assertions library?. Only needed for CDK 1.x. If using CDK 2.x then assertions is already included in 'aws-cdk-lib'- Returns:
this
-
cdkDependencies
@Stability(Deprecated) @Deprecated public AwsCdkDepsOptions.Builder cdkDependencies(List<String> cdkDependencies)
Deprecated.For CDK 2.x use "deps" instead. (or "peerDeps" if you're building a library)Sets the value ofAwsCdkDepsCommonOptions.getCdkDependencies()- Parameters:
cdkDependencies- Which AWS CDKv1 modules this project requires.- Returns:
this
-
cdkDependenciesAsDeps
@Stability(Deprecated) @Deprecated public AwsCdkDepsOptions.Builder cdkDependenciesAsDeps(Boolean cdkDependenciesAsDeps)
Deprecated.Not supported in CDK v2.Sets the value ofAwsCdkDepsCommonOptions.getCdkDependenciesAsDeps()- Parameters:
cdkDependenciesAsDeps- If this is enabled (default), all modules declared incdkDependencieswill be also added as normaldependencies(as well aspeerDependencies). This is to ensure that downstream consumers actually have your CDK dependencies installed when using npm < 7 or yarn, where peer dependencies are not automatically installed. If this is disabled,cdkDependencieswill be added todevDependenciesto ensure they are present during development.Note: this setting only applies to construct library projects
- Returns:
this
-
cdkTestDependencies
@Stability(Deprecated) @Deprecated public AwsCdkDepsOptions.Builder cdkTestDependencies(List<String> cdkTestDependencies)
Deprecated.For CDK 2.x use 'devDeps' (in node.js projects) or 'testDeps' (in java projects) insteadSets the value ofAwsCdkDepsCommonOptions.getCdkTestDependencies()- Parameters:
cdkTestDependencies- AWS CDK modules required for testing.- Returns:
this
-
cdkVersionPinning
@Stability(Experimental) public AwsCdkDepsOptions.Builder cdkVersionPinning(Boolean cdkVersionPinning)
Sets the value ofAwsCdkDepsCommonOptions.getCdkVersionPinning()- Parameters:
cdkVersionPinning- Use pinned version instead of caret version for CDK. You can use this to prevent mixed versions for your CDK dependencies and to prevent auto-updates. If you use experimental features this will let you define the moment you include breaking changes.- Returns:
this
-
constructsVersion
@Stability(Experimental) public AwsCdkDepsOptions.Builder constructsVersion(String constructsVersion)
Sets the value ofAwsCdkDepsCommonOptions.getConstructsVersion()- Parameters:
constructsVersion- Minimum version of theconstructslibrary to depend on.- Returns:
this
-
build
@Stability(Experimental) public AwsCdkDepsOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AwsCdkDepsOptions>- Returns:
- a new instance of
AwsCdkDepsOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-