@@ -48,30 +48,21 @@ dependencies {
4848 testRuntimeOnly(libs.slf4j.simple)
4949}
5050
51- ktfmt {
52- kotlinLangStyle()
53- }
51+ ktfmt { kotlinLangStyle() }
5452
55- java {
56- consistentResolution { useCompileClasspathVersions() }
57- }
53+ java { consistentResolution { useCompileClasspathVersions() } }
5854
5955tasks.withType<AbstractArchiveTask >().configureEach {
6056 isPreserveFileTimestamps = false
6157 isReproducibleFileOrder = true
6258}
6359
64- kotlin {
65- explicitApi()
66- }
60+ kotlin { explicitApi() }
6761
6862tasks.withType<KotlinCompile >().configureEach {
6963 compilerOptions {
7064 jvmTarget = JvmTarget .JVM_21
71- freeCompilerArgs.addAll( listOf (
72- " -Xjsr305=strict" ,
73- " -Xjdk-release=21"
74- ))
65+ freeCompilerArgs.addAll(listOf (" -Xjsr305=strict" , " -Xjdk-release=21" ))
7566 }
7667}
7768
@@ -100,65 +91,61 @@ mavenPublishing {
10091 }
10192 scm {
10293 connection = " scm:git:git://github.com/cloudshiftinc/kotlin-cdk-extensions.git"
103- developerConnection = " scm:git:https://github.com/cloudshiftinc/kotlin-cdk-extensions.git"
94+ developerConnection =
95+ " scm:git:https://github.com/cloudshiftinc/kotlin-cdk-extensions.git"
10496 url = " https://github.com/cloudshiftinc/kotlin-cdk-extensions"
10597 }
10698 }
10799}
108100
109101testing {
110102 suites {
111- val test by getting(JvmTestSuite ::class ) {
112- useJUnitJupiter()
113- dependencies {
114- implementation(platform(libs.kotest.bom))
115- implementation(libs.kotest.assertions.core)
116- implementation(libs.kotest.assertions.json)
117- implementation(libs.kotest.runner.junit5)
118- }
119- targets {
120- all {
121- testTask.configure {
122- outputs.upToDateWhen { false }
123- testLogging {
124- events =
125- setOf (
126- TestLogEvent .FAILED ,
127- TestLogEvent .PASSED ,
128- TestLogEvent .SKIPPED ,
129- TestLogEvent .STANDARD_OUT ,
130- TestLogEvent .STANDARD_ERROR
131- )
132- exceptionFormat = TestExceptionFormat .FULL
133- showExceptions = true
134- showCauses = true
135- showStackTraces = true
103+ val test by
104+ getting(JvmTestSuite ::class ) {
105+ useJUnitJupiter()
106+ dependencies {
107+ implementation(platform(libs.kotest.bom))
108+ implementation(libs.kotest.assertions.core)
109+ implementation(libs.kotest.assertions.json)
110+ implementation(libs.kotest.runner.junit5)
111+ }
112+ targets {
113+ all {
114+ testTask.configure {
115+ outputs.upToDateWhen { false }
116+ testLogging {
117+ events =
118+ setOf (
119+ TestLogEvent .FAILED ,
120+ TestLogEvent .PASSED ,
121+ TestLogEvent .SKIPPED ,
122+ TestLogEvent .STANDARD_OUT ,
123+ TestLogEvent .STANDARD_ERROR ,
124+ )
125+ exceptionFormat = TestExceptionFormat .FULL
126+ showExceptions = true
127+ showCauses = true
128+ showStackTraces = true
129+ }
136130 }
137131 }
138132 }
139133 }
140- }
141134 }
142135}
143136
144-
145137val ciBuild = System .getenv(" CI" ) != null
146138
147- val precommit = tasks.register(" precommit" ) {
148- group = " verification"
149- dependsOn(" check" , " ktfmtFormat" , " apiDump" )
150- }
139+ val precommit =
140+ tasks.register(" precommit" ) {
141+ group = " verification"
142+ dependsOn(" check" , " ktfmtFormat" , " apiDump" )
143+ }
151144
152145// only check formatting for CI builds
153- tasks.withType<KtfmtCheckTask >().configureEach {
154- enabled = ciBuild
155- }
146+ tasks.withType<KtfmtCheckTask >().configureEach { enabled = ciBuild }
156147
157148// always format for non-CI builds
158- tasks.withType<KtfmtFormatTask >().configureEach {
159- enabled = ! ciBuild
160- }
149+ tasks.withType<KtfmtFormatTask >().configureEach { enabled = ! ciBuild }
161150
162- tasks.named(" apiCheck" ) {
163- mustRunAfter(" apiDump" )
164- }
151+ tasks.named(" apiCheck" ) { mustRunAfter(" apiDump" ) }
0 commit comments