diff --git a/buildSrc/src/main/groovy/airbyte-python.gradle b/buildSrc/src/main/groovy/airbyte-python.gradle index 88510972cac..ce3f16ab2cb 100644 --- a/buildSrc/src/main/groovy/airbyte-python.gradle +++ b/buildSrc/src/main/groovy/airbyte-python.gradle @@ -26,16 +26,17 @@ class AirbytePythonPlugin implements Plugin { pip 'pip:20.2' } + project.task('isortFormat', type: PythonTask) { + module = "isort" + command = ". --settings-file ${project.rootProject.file('tools/python/.isort.cfg').absolutePath}" + } + project.task('blackFormat', type: PythonTask) { module = "black" // the line length should match .isort.cfg command = ". --line-length 140" dependsOn project.rootProject.spotlessPythonApply - } - - project.task('isortFormat', type: PythonTask) { - module = "isort" - command = ". --settings-file ${project.rootProject.file('tools/python/.isort.cfg').absolutePath}" + dependsOn project.isortFormat } project.task('flakeCheck', type: PythonTask, dependsOn: project.blackFormat) {