import Ġcom . github . jen gel man . gradle . plugins . shadow . tasks . Shadow Jar Ċ Ċ plugins Ġ{ ĊĠĠĠ Ġkotlin (" jvm ") ĊĠĠĠ Ġfile Indices Ċ } Ċ Ċ dependencies Ġ{ ĊĠĠĠ Ġval Ġversion Cor outines : ĠString Ġby Ġproject ĊĠĠĠ Ġval Ġversion Common s Io : ĠString Ġby Ġproject ĊĠĠĠ Ġval Ġversion Jack son : ĠString Ġby Ġproject ĊĊĠĠĠ Ġcompile Only ( kotlin ( module Ġ= Ġ" stdlib ")) ĊĊĠĠĠ Ġcompile Only ( platform ( kotlin x (" coroutines - bom ", Ġversion Cor outines ))) ĊĠĠĠ Ġcompile Only ( kotlin x (" coroutines - core ")) ĊĊĠĠĠ Ġimplementation ( group Ġ= Ġ" commons - io ", Ġname Ġ= Ġ" commons - io ", Ġversion Ġ= Ġversion Common s Io ) ĊĊĠĠĠ Ġimplementation ( platform (" com . fasterxml . jackson : jackson - bom :$ version Jack son ")) ĊĠĠĠ Ġimplementation ( group Ġ= Ġ" com . fasterxml . jackson . core ", Ġname Ġ= Ġ" jackson - core ") ĊĠĠĠ Ġimplementation ( group Ġ= Ġ" com . fasterxml . jackson . core ", Ġname Ġ= Ġ" jackson - databind ") ĊĠĠĠ Ġimplementation ( group Ġ= Ġ" com . fasterxml . jackson . data format ", Ġname Ġ= Ġ" jackson - data format - yaml ") Ċ } Ċ Ċ val Ġminim ized Jar : ĠConfiguration Ġby Ġconfigurations . creating Ġ{ ĊĠĠĠ Ġis Can Be Cons umed Ġ= Ġtrue ĊĠĠĠ Ġis Can Be Resolved Ġ= Ġfalse ĊĠĠĠ Ġextends From ( configurations [" implementation "], Ġconfigurations [" runtime Only "]) Ċ } Ċ Ċ tasks Ġ{ ĊĠĠĠ Ġval Ġminim ized Jar Ġby Ġregistering ( Shadow Jar :: class ) Ġ{ ĊĠĠĠĠĠĠĠ Ġgroup Ġ= Ġ" build " ĊĊĠĠĠĠĠĠĠ Ġarchive Classifier . set (" minim ized ") ĊĊĠĠĠĠĠĠĠ Ġfrom ( source Sets . main . map ( Source Set :: getOutput )) ĊĊĠĠĠĠĠĠĠ Ġval Ġicon Paths Ġ= ĠarrayOf ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRegex (""" /? discord / applications / .* \. png "" "), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRegex (""" /? discord / themes / .* \. png """) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġtransform ( P ng Optim izing Transformer ( 1 2 8 , Ġ* icon Paths )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġartifacts Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Suppress (" Un stable Api Usage ") ĊĠĠĠĠĠĠĠ Ġadd (" minim ized Jar ", Ġminim ized Jar . flatMap Ġ{ Ġit . archive File Ġ}) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilt By ( minim ized Jar ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġgenerate File Indices Ġ{ ĊĠĠĠĠĠĠĠ Ġpaths Ġ+= Ġ" discord / applications " ĊĠĠĠĠĠĠĠ Ġpaths Ġ+= Ġ" discord / languages " ĊĠĠĠĠĠĠĠ Ġpaths Ġ+= Ġ" discord / themes " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġgenerate Icons Ġ= Ġcreate (" generate - icons ") Ġ{ ĊĠĠĠĠĠĠĠ Ġgroup Ġ= Ġ" icons " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġgenerate Material Application Icons Ġ= Ġcreate < Exec >(" generate - material - application - icons ") Ġ{ ĊĠĠĠĠĠĠĠ Ġworking Dir ( project . file (" src / main / resources / discord / applications / material ")) ĊĠĠĠĠĠĠĠ Ġcommand Line Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" mag ick ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" mo gr ify ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"- resize ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" 8 0 0 x 8 0 0 ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"- gravity ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" center ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"- border color ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"\" # 2 3 2 7 2 A \"", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"- border ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" 1 1 2 x 1 1 2 ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"- path ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ".", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ"../ *. png " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġdelete Material Application Icons Ġ= Ġcreate < Delete >(" delete - material - application - icons ") Ġ{ ĊĠĠĠĠĠĠĠ Ġdelete ( file Tree (" src / main / resources / discord / applications / material /") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinclude (" *. png ") ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġgenerate Icons . depends On ( generate Material Application Icons ) ĊĠĠĠ Ġgenerate Material Application Icons . depends On ( delete Material Application Icons ) Ċ } Ċ