Skip to content

Commit

Permalink
fix: improve java synth time
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Jul 27, 2023
1 parent cef1a18 commit 5148307
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 15 deletions.
4 changes: 2 additions & 2 deletions examples/java/aws/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"terraformProviders": ["aws@~> 3.0"]
"app": "mvn -e -q exec:java",
"terraformProviders": ["aws@~> 5.9"]
}
2 changes: 1 addition & 1 deletion examples/java/azure/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": ["azurerm@~> 2.0.0"]
}
2 changes: 1 addition & 1 deletion examples/java/documentation/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"codeMakerOutput": "src/main/java/imports",
"terraformProviders": [
"aws@~> 3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/java/google/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": ["google@~> 3.0"]
}
2 changes: 1 addition & 1 deletion examples/java/kubernetes/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": [
"kubernetes@~> 1.11.3"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/java/ucloud/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": ["ucloud/ucloud@~> 1.29.0"]
}
2 changes: 1 addition & 1 deletion packages/@cdktf/cli-core/templates/java/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"projectId": "{{projectId}}",
"sendCrashReports": "{{sendCrashReports}}",
"codeMakerOutput": "src/main/java/imports",
Expand Down
2 changes: 1 addition & 1 deletion test/java/edge/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": ["hashicorp/null@~> 3.1.0"],
"context": {}
}
2 changes: 1 addition & 1 deletion test/java/no-color-command-option-test/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": [],
"context": {}
}
2 changes: 1 addition & 1 deletion test/java/provider-add-command/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": [],
"context": {}
}
2 changes: 1 addition & 1 deletion test/java/provider-list-command/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": [],
"context": {}
}
2 changes: 1 addition & 1 deletion test/java/provider-upgrade-command/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": [],
"context": {}
}
2 changes: 1 addition & 1 deletion test/java/synth-app/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": ["hashicorp/null@~> 3.1.0", "hashicorp/random@= 3.1.3"],
"context": {}
}
2 changes: 1 addition & 1 deletion test/java/testing-matchers/cdktf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "java",
"app": "mvn -e -q compile exec:java",
"app": "mvn -e -q exec:java",
"terraformProviders": ["kreuzwerker/docker@~> 2.0"],
"context": {}
}
1 change: 1 addition & 0 deletions website/data/cdktf-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"title": "Overview",
"path": "release"
},
{ "title": "Upgrading to Version 0.18", "path": "release/upgrade-guide-v0-18" },
{ "title": "Upgrading to Version 0.17", "path": "release/upgrade-guide-v0-17" },
{ "title": "Upgrading to Version 0.15", "path": "release/upgrade-guide-v0-15" },
{ "title": "Upgrading to Version 0.13", "path": "release/upgrade-guide-v0-13" },
Expand Down
20 changes: 20 additions & 0 deletions website/docs/cdktf/release/upgrade-guide-v0-18.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
page_title: Upgrading to CDKTF Version 0.18
description: >-
Performance improvements might require you to update your `cdktf.json` file.
---

# Upgrading to CDK for Terraform Version 0.18

0.18 is focused around improving the synthetization performance across all languages. This means that the generated code is now faster to compile. We achieved this mostly by changing the way we generate the code for the Terraform configuration but also by updates within JSII, the tool we use to support multiple languages.

## Java: Change the `app` field in your `cdktf.json` file for better performance

If you are using Java and want to improve the performance of `cdktf synth` you can change your `app` field in your `cdktf.json` file from the default `mvn -e -q compile exec:java` to `mvn -e -q exec:java`. This will improve the performance of `cdktf synth` by 70-80%.

```json
{
"language": "java",
"app": "mvn -e -q exec:java"
}
```

0 comments on commit 5148307

Please sign in to comment.