@@ -3,10 +3,10 @@ SPDX-License-Identifier: Apache-2.0 */
3
3
import * as fs from "fs" ;
4
4
import * as path from "path" ;
5
5
import { CloudscapeReactTsWebsiteProject } from "@aws/cloudscape-react-ts-website" ;
6
- import { NxProject } from "@aws/monorepo" ;
6
+ import { NxProject , ProjectUtils } from "@aws/monorepo" ;
7
7
import { TypeSafeApiProject } from "@aws/type-safe-api" ;
8
8
import * as Mustache from "mustache" ;
9
- import { SampleFile } from "projen" ;
9
+ import { DependencyType , SampleFile } from "projen" ;
10
10
import { AwsCdkJavaApp } from "projen/lib/awscdk" ;
11
11
import { AwsCdkJavaAppOptions } from "./aws-cdk-java-app-options" ;
12
12
import { InfrastructureCommands } from "../../components/infrastructure-commands" ;
@@ -56,7 +56,8 @@ export class InfrastructureJavaProject extends AwsCdkJavaApp {
56
56
57
57
super ( {
58
58
...options ,
59
- cdkVersion : options . cdkVersion ?? "2.1.0" ,
59
+ cdkVersion : options . cdkVersion ?? "2.133.0" ,
60
+ cdkVersionPinning : true ,
60
61
sample : false ,
61
62
junit : false ,
62
63
groupId,
@@ -76,6 +77,13 @@ export class InfrastructureJavaProject extends AwsCdkJavaApp {
76
77
} ,
77
78
} ) ;
78
79
80
+ // Pin constructs version
81
+ this . deps . removeDependency (
82
+ "software.constructs/constructs" ,
83
+ DependencyType . RUNTIME
84
+ ) ;
85
+ this . addDependency ( "software.constructs/[email protected] " ) ;
86
+
79
87
InfrastructureCommands . ensure ( this ) ;
80
88
81
89
this . pom . addPlugin ( "org.apache.maven.plugins/[email protected] " ) ;
@@ -87,16 +95,16 @@ export class InfrastructureJavaProject extends AwsCdkJavaApp {
87
95
88
96
if ( options . junit !== false ) {
89
97
[
90
- "org.junit.jupiter/junit-jupiter-api@^5 " ,
91
- "org.junit.jupiter/junit-jupiter-engine@^5 " ,
92
- "io.github.origin-energy/java-snapshot-testing-junit5@^ 4.0.6 " ,
93
- "io.github.origin-energy/java-snapshot-testing-plugin-jackson@^ 4.0.6 " ,
98
+ "org.junit.jupiter/junit-jupiter-api@5.10.2 " ,
99
+ "org.junit.jupiter/junit-jupiter-engine@5.10.2 " ,
100
+ "io.github.origin-energy/[email protected] .7 " ,
101
+ "io.github.origin-energy/[email protected] .7 " ,
94
102
95
103
] . forEach ( ( d ) => this . addTestDependency ( d ) ) ;
96
104
this . testTask . exec ( "mvn test" ) ;
97
105
}
98
106
99
- this . addDependency ( " software.aws/pdk@^0" ) ;
107
+ this . addDependency ( ` software.aws/pdk@${ ProjectUtils . getPdkVersion ( ) } ` ) ;
100
108
101
109
const srcDir = path . resolve (
102
110
__dirname ,
0 commit comments