Skip to content

Commit 5501e8f

Browse files
Bump com.ncorti.ktfmt.gradle from 0.20.1 to 0.23.0 in /lib/kotlin (#3174)
* Bump com.ncorti.ktfmt.gradle from 0.20.1 to 0.23.0 in /lib/kotlin Bumps com.ncorti.ktfmt.gradle from 0.20.1 to 0.23.0. --- updated-dependencies: - dependency-name: com.ncorti.ktfmt.gradle dependency-version: 0.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Apply ktmftFormat changes for new ktfmt version --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
1 parent 9524524 commit 5501e8f

File tree

4 files changed

+66
-93
lines changed

4 files changed

+66
-93
lines changed

lib/kotlin/build.gradle.kts

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ plugins {
2424
id("com.ncorti.ktfmt.gradle")
2525
}
2626

27-
repositories {
28-
mavenCentral()
29-
}
27+
repositories { mavenCentral() }
3028

3129
dependencies {
3230
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
@@ -36,11 +34,7 @@ dependencies {
3634
testImplementation(kotlin("test"))
3735
}
3836

39-
kotlin {
40-
jvmToolchain {
41-
languageVersion.set(JavaLanguageVersion.of(17))
42-
}
43-
}
37+
kotlin { jvmToolchain { languageVersion.set(JavaLanguageVersion.of(17)) } }
4438

4539
java {
4640
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -56,41 +50,36 @@ tasks.withType<KotlinCompile> {
5650

5751
tasks {
5852
if (JavaVersion.current().isJava11Compatible) {
59-
ktfmt {
60-
kotlinLangStyle()
61-
}
53+
ktfmt { kotlinLangStyle() }
6254
}
6355

64-
test {
65-
useJUnitPlatform()
66-
}
56+
test { useJUnitPlatform() }
6757

6858
task<Exec>("compileThrift") {
69-
val thriftBin = if (hasProperty("thrift.compiler")) {
70-
file(property("thrift.compiler")!!)
71-
} else {
72-
project.rootDir.resolve("../../compiler/cpp/thrift")
73-
}
59+
val thriftBin =
60+
if (hasProperty("thrift.compiler")) {
61+
file(property("thrift.compiler")!!)
62+
} else {
63+
project.rootDir.resolve("../../compiler/cpp/thrift")
64+
}
7465
val outputDir = layout.buildDirectory.dir("generated-sources")
75-
doFirst {
76-
mkdir(outputDir)
77-
}
78-
commandLine = listOf(
79-
thriftBin.absolutePath,
80-
"-gen",
81-
"kotlin",
82-
"-out",
83-
outputDir.get().toString(),
84-
layout.projectDirectory.file("src/test/resources/AnnotationTest.thrift").asFile.absolutePath
85-
)
66+
doFirst { mkdir(outputDir) }
67+
commandLine =
68+
listOf(
69+
thriftBin.absolutePath,
70+
"-gen",
71+
"kotlin",
72+
"-out",
73+
outputDir.get().toString(),
74+
layout.projectDirectory
75+
.file("src/test/resources/AnnotationTest.thrift")
76+
.asFile
77+
.absolutePath,
78+
)
8679
group = LifecycleBasePlugin.BUILD_GROUP
8780
}
8881

89-
compileKotlin {
90-
dependsOn("compileThrift")
91-
}
82+
compileKotlin { dependsOn("compileThrift") }
9283
}
9384

94-
sourceSets["main"].java {
95-
srcDir(layout.buildDirectory.dir("generated-sources"))
96-
}
85+
sourceSets["main"].java { srcDir(layout.buildDirectory.dir("generated-sources")) }

lib/kotlin/cross-test-client/build.gradle.kts

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ plugins {
2424
id("com.ncorti.ktfmt.gradle")
2525
}
2626

27-
repositories {
28-
mavenCentral()
29-
}
27+
repositories { mavenCentral() }
3028

3129
val slf4jVersion: String by project
3230
val httpclientVersion: String by project
@@ -57,37 +55,31 @@ tasks {
5755
}
5856

5957
if (JavaVersion.current().isJava11Compatible) {
60-
ktfmt {
61-
kotlinLangStyle()
62-
}
58+
ktfmt { kotlinLangStyle() }
6359
}
6460

6561
task<Exec>("compileThrift") {
66-
val thriftBin = if (hasProperty("thrift.compiler")) {
67-
file(property("thrift.compiler")!!)
68-
} else {
69-
project.rootDir.resolve("../../compiler/cpp/thrift")
70-
}
62+
val thriftBin =
63+
if (hasProperty("thrift.compiler")) {
64+
file(property("thrift.compiler")!!)
65+
} else {
66+
project.rootDir.resolve("../../compiler/cpp/thrift")
67+
}
7168
val outputDir = layout.buildDirectory.dir("generated-sources")
72-
doFirst {
73-
mkdir(outputDir)
74-
}
75-
commandLine = listOf(
76-
thriftBin.absolutePath,
77-
"-gen",
78-
"kotlin",
79-
"-out",
80-
outputDir.get().toString(),
81-
project.rootDir.resolve("../../test/ThriftTest.thrift").absolutePath
82-
)
69+
doFirst { mkdir(outputDir) }
70+
commandLine =
71+
listOf(
72+
thriftBin.absolutePath,
73+
"-gen",
74+
"kotlin",
75+
"-out",
76+
outputDir.get().toString(),
77+
project.rootDir.resolve("../../test/ThriftTest.thrift").absolutePath,
78+
)
8379
group = LifecycleBasePlugin.BUILD_GROUP
8480
}
8581

86-
compileKotlin {
87-
dependsOn("compileThrift")
88-
}
82+
compileKotlin { dependsOn("compileThrift") }
8983
}
9084

91-
sourceSets["main"].java {
92-
srcDir(layout.buildDirectory.dir("generated-sources"))
93-
}
85+
sourceSets["main"].java { srcDir(layout.buildDirectory.dir("generated-sources")) }

lib/kotlin/cross-test-server/build.gradle.kts

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ plugins {
2424
id("com.ncorti.ktfmt.gradle")
2525
}
2626

27-
repositories {
28-
mavenCentral()
29-
}
27+
repositories { mavenCentral() }
3028

3129
val slf4jVersion: String by project
3230
val httpcoreVersion: String by project
@@ -55,37 +53,31 @@ tasks {
5553
}
5654

5755
if (JavaVersion.current().isJava11Compatible) {
58-
ktfmt {
59-
kotlinLangStyle()
60-
}
56+
ktfmt { kotlinLangStyle() }
6157
}
6258

6359
task<Exec>("compileThrift") {
64-
val thriftBin = if (hasProperty("thrift.compiler")) {
65-
file(property("thrift.compiler")!!)
66-
} else {
67-
project.rootDir.resolve("../../compiler/cpp/thrift")
68-
}
60+
val thriftBin =
61+
if (hasProperty("thrift.compiler")) {
62+
file(property("thrift.compiler")!!)
63+
} else {
64+
project.rootDir.resolve("../../compiler/cpp/thrift")
65+
}
6966
val outputDir = layout.buildDirectory.dir("generated-sources")
70-
doFirst {
71-
mkdir(outputDir)
72-
}
73-
commandLine = listOf(
74-
thriftBin.absolutePath,
75-
"-gen",
76-
"kotlin",
77-
"-out",
78-
outputDir.get().toString(),
79-
project.rootDir.resolve("../../test/ThriftTest.thrift").absolutePath
80-
)
67+
doFirst { mkdir(outputDir) }
68+
commandLine =
69+
listOf(
70+
thriftBin.absolutePath,
71+
"-gen",
72+
"kotlin",
73+
"-out",
74+
outputDir.get().toString(),
75+
project.rootDir.resolve("../../test/ThriftTest.thrift").absolutePath,
76+
)
8177
group = LifecycleBasePlugin.BUILD_GROUP
8278
}
8379

84-
compileKotlin {
85-
dependsOn("compileThrift")
86-
}
80+
compileKotlin { dependsOn("compileThrift") }
8781
}
8882

89-
sourceSets["main"].java {
90-
srcDir(layout.buildDirectory.dir("generated-sources"))
91-
}
83+
sourceSets["main"].java { srcDir(layout.buildDirectory.dir("generated-sources")) }

lib/kotlin/settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
pluginManagement {
2020
plugins {
2121
kotlin("jvm") version "2.2.10"
22-
id("com.ncorti.ktfmt.gradle") version "0.20.1"
22+
id("com.ncorti.ktfmt.gradle") version "0.23.0"
2323
}
2424
}
2525

0 commit comments

Comments
 (0)