package Ġcom . v ann ik tech . dependency . graph . generator Ċ Ċ import Ġcom . v ann ik tech . dependency . graph . generator . Dependency Graph Generator Extension . Generator Ċ import Ġg uru . n idi . graph viz . engine . Graph viz Ċ import Ġorg . gradle . api . Default Task Ċ import Ġorg . gradle . api . tasks . Cache able Task Ċ import Ġorg . gradle . api . tasks . Input File Ċ import Ġorg . gradle . api . tasks . Output Directory Ċ import Ġorg . gradle . api . tasks . Task Action Ċ import Ġjava . io . File Ċ Ċ @ Cache able Task Ġopen Ġclass ĠDependency Graph Generator Task Ġ: ĠDefault Task () Ġ{ ĊĠ Ġlateinit Ġvar Ġgenerator : ĠGenerator Ġ// ĠTODO Ġdoes Ġthis Ġneed Ġto Ġbe Ġan Ġinput ? ĠQuick Ġtesting Ġshows Ġno . ĊĠ Ġ@ Input File Ġlateinit Ġvar Ġinput File : ĠFile ĊĊĠ Ġ@ Output Directory Ġlateinit Ġvar Ġoutput Directory : ĠFile ĊĊĠ Ġ@ Task Action Ġfun Ġrun () Ġ{ ĊĠĠĠ Ġval Ġgraph Ġ= ĠDependency Graph Generator ( project , Ġgenerator ). generate Graph () ĊĠĠĠ ĠFile ( output Directory , Ġgenerator . output FileName Dot ). write Text ( graph . toString ()) ĊĊĠĠĠ Ġval Ġgraph viz Ġ= ĠGraph viz . from Graph ( graph ) ĊĊĠĠĠ Ġgenerator . output Formats . forEach Ġ{ ĊĠĠĠĠĠ Ġgraph viz . render ( it ). to File ( File ( output Directory , Ġgenerator . output FileName )) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ