Skip to content

Commit

Permalink
reorder tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWang committed May 7, 2024
1 parent 98a87f8 commit b9272ca
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions clients/client-python/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ tasks {
}

val black by registering(VenvTask::class) {
mustRunAfter(pipInstall)
dependsOn(pipInstall)
venvExec = "black"
args = listOf("./gravitino", "./tests")
}

val pylint by registering(VenvTask::class) {
dependsOn(pipInstall)
mustRunAfter(black)
venvExec = "pylint"
args = listOf("./gravitino", "./tests")
Expand All @@ -57,7 +58,6 @@ tasks {
gravitinoServer("start")
}

dependsOn(pipInstall, black, pylint)
venvExec = "python"
args = listOf("-m", "unittest")
workingDir = projectDir.resolve(".")
Expand All @@ -74,7 +74,6 @@ tasks {
}

val build by registering(VenvTask::class) {
dependsOn(pipInstall, black, pylint)
}

val clean by registering(Delete::class) {
Expand All @@ -86,4 +85,11 @@ tasks {
deleteCacheDir("__pycache__")
}
}

matching {
it.name.endsWith("envSetup")
}.all {
// add install package and code formatting before any tasks
finalizedBy(pipInstall, black, pylint)
}
}

0 comments on commit b9272ca

Please sign in to comment.