Skip to content

Commit

Permalink
[ci] Fixes gradle 8.12 warnings (#2693)
Browse files Browse the repository at this point in the history
  • Loading branch information
xyang16 authored Jan 30, 2025
1 parent 0495859 commit 85f99a7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ libs
*.pt
*.npy
*.csv
.kotlin

# Eclipse
.settings
Expand Down
7 changes: 5 additions & 2 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,13 @@ tasks {
mainClass = "ai.djl.benchmark.Benchmark"
}

register("prepareDeb") {
open class Cmd @Inject constructor(@Internal val execOperations: ExecOperations) : DefaultTask()

register<Cmd>("prepareDeb") {
dependsOn(distTar)
doFirst {
exec {
execOperations.exec {
workingDir = projectDir
commandLine(
"tar",
"xvf",
Expand Down
12 changes: 7 additions & 5 deletions buildSrc/src/main/kotlin/ai/djl/pythonFormatter.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package ai.djl

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

tasks {
register("formatPython") {
register<Cmd>("formatPython") {
doLast {
project.exec {
execOperations.exec {
workingDir = projectDir
commandLine(
"bash",
"-c",
Expand All @@ -15,10 +16,11 @@ tasks {
}
}

val verifyPython by registering {
register<Cmd>("verifyPython") {
doFirst {
try {
project.exec {
execOperations.exec {
workingDir = projectDir
commandLine(
"bash",
"-c",
Expand Down
7 changes: 5 additions & 2 deletions buildSrc/src/main/kotlin/ai/djl/shellFormatter.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package ai.djl

open class Cmd @Inject constructor(@Internal val execOperations: ExecOperations) : DefaultTask()

tasks {
register("formatShell") {
register<Cmd>("formatShell") {
doLast {
project.exec {
execOperations.exec {
workingDir = projectDir
commandLine(
"bash",
"-c",
Expand Down
7 changes: 5 additions & 2 deletions serving/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@ tasks {
}
}

register("prepareDeb") {
open class Cmd @Inject constructor(@Internal val execOperations: ExecOperations) : DefaultTask()

register<Cmd>("prepareDeb") {
dependsOn(distTar)
doFirst {
exec {
execOperations.exec {
workingDir = projectDir
commandLine(
"tar",
"xvf",
Expand Down

0 comments on commit 85f99a7

Please sign in to comment.