diff --git a/build.gradle.kts b/build.gradle.kts index dc774f7..a87ec6f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - kotlin("jvm") version "1.3.70" + kotlin("jvm") version "1.4.10" id("maven-publish") id("com.jfrog.bintray") version "1.8.4" } diff --git a/dsl-generator/build.gradle.kts b/dsl-generator/build.gradle.kts index 966916f..f608374 100644 --- a/dsl-generator/build.gradle.kts +++ b/dsl-generator/build.gradle.kts @@ -6,6 +6,8 @@ plugins { val awsCdkVersion: String by project version = rootProject.version.toString().split("-")[1] +val isCI = System.getenv("CI") == "true" + publishing { publications { register("maven", MavenPublication::class) { @@ -25,14 +27,17 @@ repositories { dependencies { implementation(kotlin("stdlib-jdk8")) implementation(kotlin("reflect")) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.4") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9") implementation(project(":dsl-common")) - implementation("com.squareup:kotlinpoet:1.5.0") + implementation("com.squareup:kotlinpoet:1.6.0") implementation("com.google.guava:guava:28.2-jre") - // AWS CDK - implementation("software.amazon.awscdk", "lambda", awsCdkVersion) - implementation("software.amazon.awscdk", "sam", awsCdkVersion) + // AWS-CDK/Core, Need to compile + implementation("software.amazon.awscdk", "core", awsCdkVersion) + // AWS CDK, Only for dev & debug use + if (!isCI) { + implementation("software.amazon.awscdk", "appflow", awsCdkVersion) + } } tasks.withType { diff --git a/dsl-generator/src/main/kotlin/jp/justincase/cdkdsl/generator/PropClassExtensionGenerator.kt b/dsl-generator/src/main/kotlin/jp/justincase/cdkdsl/generator/PropClassExtensionGenerator.kt index aef72db..885bda4 100644 --- a/dsl-generator/src/main/kotlin/jp/justincase/cdkdsl/generator/PropClassExtensionGenerator.kt +++ b/dsl-generator/src/main/kotlin/jp/justincase/cdkdsl/generator/PropClassExtensionGenerator.kt @@ -141,7 +141,7 @@ object PropClassExtensionGenerator { handledDuplicates += name } } else { - addStatement("${fieldName}?.let{ builder.$name(it) }") + addStatement("%N?.let{ builder.%N(it) }", fieldName, name) } } addStatement("return builder.build()") diff --git a/gradle.properties b/gradle.properties index e6f3d28..20a6e4c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ kotlin.code.style=official -awsCdkVersion=1.27.0 -kotlinVersion=1.3.70 +awsCdkVersion=1.66.0 +kotlinVersion=1.4.10 org.gradle.parallel=true \ No newline at end of file