One question, `gradlew build` run check and/or fo...
# ktfmt
j
One question,
gradlew build
run check and/or format tasks?
g
build
will run the
check
task, that will subsequently call all the
ktfmtCheck
task.
j
nice, I can do this without breaking the parallel execution or cache? The idea is
gradlew build
fix the format automatically. I don’t know if could be interesting to have a flag about this in
ktfmt
block 🤔
Copy code
afterEvaluate {
    tasks.getByName("ktfmtCheck").dependsOn(tasks.getByName("ktfmtFormat"))
}
g
What I usually do, I have a
reformatAll
task to reformat everything
I have to say that I’m not a big fan of having tasks that edit the code in the
build
task.
👍 1