Commit 85f99a7 1 parent 0495859 commit 85f99a7 Copy full SHA for 85f99a7
File tree 5 files changed +23
-11
lines changed
buildSrc/src/main/kotlin/ai/djl
5 files changed +23
-11
lines changed Original file line number Diff line number Diff line change 15
15
* .pt
16
16
* .npy
17
17
* .csv
18
+ .kotlin
18
19
19
20
# Eclipse
20
21
.settings
Original file line number Diff line number Diff line change @@ -83,10 +83,13 @@ tasks {
83
83
mainClass = " ai.djl.benchmark.Benchmark"
84
84
}
85
85
86
- register(" prepareDeb" ) {
86
+ open class Cmd @Inject constructor(@Internal val execOperations : ExecOperations ) : DefaultTask()
87
+
88
+ register<Cmd >(" prepareDeb" ) {
87
89
dependsOn(distTar)
88
90
doFirst {
89
- exec {
91
+ execOperations.exec {
92
+ workingDir = projectDir
90
93
commandLine(
91
94
" tar" ,
92
95
" xvf" ,
Original file line number Diff line number Diff line change 1
1
package ai.djl
2
2
3
- import org.gradle.kotlin.dsl.registering
3
+ open class Cmd @Inject constructor(@Internal val execOperations : ExecOperations ) : DefaultTask()
4
4
5
5
tasks {
6
- register(" formatPython" ) {
6
+ register< Cmd > (" formatPython" ) {
7
7
doLast {
8
- project.exec {
8
+ execOperations.exec {
9
+ workingDir = projectDir
9
10
commandLine(
10
11
" bash" ,
11
12
" -c" ,
@@ -15,10 +16,11 @@ tasks {
15
16
}
16
17
}
17
18
18
- val verifyPython by registering {
19
+ register< Cmd >( " verifyPython" ) {
19
20
doFirst {
20
21
try {
21
- project.exec {
22
+ execOperations.exec {
23
+ workingDir = projectDir
22
24
commandLine(
23
25
" bash" ,
24
26
" -c" ,
Original file line number Diff line number Diff line change 1
1
package ai.djl
2
2
3
+ open class Cmd @Inject constructor(@Internal val execOperations : ExecOperations ) : DefaultTask()
4
+
3
5
tasks {
4
- register(" formatShell" ) {
6
+ register< Cmd > (" formatShell" ) {
5
7
doLast {
6
- project.exec {
8
+ execOperations.exec {
9
+ workingDir = projectDir
7
10
commandLine(
8
11
" bash" ,
9
12
" -c" ,
Original file line number Diff line number Diff line change @@ -158,10 +158,13 @@ tasks {
158
158
}
159
159
}
160
160
161
- register(" prepareDeb" ) {
161
+ open class Cmd @Inject constructor(@Internal val execOperations : ExecOperations ) : DefaultTask()
162
+
163
+ register<Cmd >(" prepareDeb" ) {
162
164
dependsOn(distTar)
163
165
doFirst {
164
- exec {
166
+ execOperations.exec {
167
+ workingDir = projectDir
165
168
commandLine(
166
169
" tar" ,
167
170
" xvf" ,
You can’t perform that action at this time.
0 commit comments