Skip to content

Commit 85f99a7

Browse files
authored
[ci] Fixes gradle 8.12 warnings (deepjavalibrary#2693)
1 parent 0495859 commit 85f99a7

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ libs
1515
*.pt
1616
*.npy
1717
*.csv
18+
.kotlin
1819

1920
# Eclipse
2021
.settings

benchmark/build.gradle.kts

+5-2
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ tasks {
8383
mainClass = "ai.djl.benchmark.Benchmark"
8484
}
8585

86-
register("prepareDeb") {
86+
open class Cmd @Inject constructor(@Internal val execOperations: ExecOperations) : DefaultTask()
87+
88+
register<Cmd>("prepareDeb") {
8789
dependsOn(distTar)
8890
doFirst {
89-
exec {
91+
execOperations.exec {
92+
workingDir = projectDir
9093
commandLine(
9194
"tar",
9295
"xvf",

buildSrc/src/main/kotlin/ai/djl/pythonFormatter.gradle.kts

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package ai.djl
22

3-
import org.gradle.kotlin.dsl.registering
3+
open class Cmd @Inject constructor(@Internal val execOperations: ExecOperations) : DefaultTask()
44

55
tasks {
6-
register("formatPython") {
6+
register<Cmd>("formatPython") {
77
doLast {
8-
project.exec {
8+
execOperations.exec {
9+
workingDir = projectDir
910
commandLine(
1011
"bash",
1112
"-c",
@@ -15,10 +16,11 @@ tasks {
1516
}
1617
}
1718

18-
val verifyPython by registering {
19+
register<Cmd>("verifyPython") {
1920
doFirst {
2021
try {
21-
project.exec {
22+
execOperations.exec {
23+
workingDir = projectDir
2224
commandLine(
2325
"bash",
2426
"-c",

buildSrc/src/main/kotlin/ai/djl/shellFormatter.gradle.kts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
package ai.djl
22

3+
open class Cmd @Inject constructor(@Internal val execOperations: ExecOperations) : DefaultTask()
4+
35
tasks {
4-
register("formatShell") {
6+
register<Cmd>("formatShell") {
57
doLast {
6-
project.exec {
8+
execOperations.exec {
9+
workingDir = projectDir
710
commandLine(
811
"bash",
912
"-c",

serving/build.gradle.kts

+5-2
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,13 @@ tasks {
158158
}
159159
}
160160

161-
register("prepareDeb") {
161+
open class Cmd @Inject constructor(@Internal val execOperations: ExecOperations) : DefaultTask()
162+
163+
register<Cmd>("prepareDeb") {
162164
dependsOn(distTar)
163165
doFirst {
164-
exec {
166+
execOperations.exec {
167+
workingDir = projectDir
165168
commandLine(
166169
"tar",
167170
"xvf",

0 commit comments

Comments
 (0)