This PR splits the code into two modules: clikt-core which contains most of the code and has zero dependencies, and clikt-mordant which depends on mordant and clikt-core and contains only the code that requires mordant.
The command type heirarcy is now BaseCliktCommand (no run function or mordant) -> CoreCliktCommand (no mordant) -> CliktCommand (all features).
Some new Context configuration porperties like exitProcess were added to allow plugging in mordant, and custom command types can call Context.installMordant() to set them all up at once.
Fortunately, the MordantHelpFormatter was already pretty customizable, so I was able to extract most of it to a base class and create a new PlaintextHelpFormatter without much extra code.
The maven coordinates for clikt-mordant are still com.github.ajalt.clikt:clikt, so the default feature set doesn't change.
This PR splits the code into two modules:
clikt-core
which contains most of the code and has zero dependencies, andclikt-mordant
which depends on mordant andclikt-core
and contains only the code that requires mordant.The command type heirarcy is now
BaseCliktCommand
(norun
function or mordant) ->CoreCliktCommand
(no mordant) ->CliktCommand
(all features).Some new
Context
configuration porperties likeexitProcess
were added to allow plugging in mordant, and custom command types can callContext.installMordant()
to set them all up at once.Fortunately, the
MordantHelpFormatter
was already pretty customizable, so I was able to extract most of it to a base class and create a newPlaintextHelpFormatter
without much extra code.The maven coordinates for
clikt-mordant
are stillcom.github.ajalt.clikt:clikt
, so the default feature set doesn't change.Fixes #507 Fixes #454