Last active
October 11, 2023 18:29
-
-
Save cwensel/047766922100d40084232d8c55408862 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app": "${PROJECT_HOME}/gradlew -q run ${GRADLE_OFFLINE_OPTION}", | |
"output": "build/cdk.out" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun commonCDKEnvironment(): Map<String, String> { | |
return mapOf( | |
"PROJECT_HOME" to project.rootDir.absolutePath, | |
"SUB_PROJECT_HOME" to project.projectDir.absolutePath, | |
"GRADLE_OFFLINE_OPTION" to if (project.gradle.startParameter.isOffline) "--offline" else "" | |
) | |
} | |
tasks.register("synthCDK", NpxTask::class) { | |
command = "aws-cdk@${cdkVersion}" | |
args = listOf("synth") | |
environment = commonCDKEnvironment() | |
enabled = file("cdk.json").exists() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment