import Ġorg . jetbrains . kotlin . gradle . tasks . Kotlin Compile Ċ Ċ plugins Ġ{ ĊĠ Ġkotlin (" jvm ") ĊĠ Ġkotlin (" k apt ") ĊĠ Ġid (" com . github . g ma zz o . build config ") ĊĠ Ġid (" kotlin - publish ") Ċ } Ċ Ċ dependencies Ġ{ ĊĠ Ġcompile Only (" org . jetbrains . kotlin : kotlin - compiler ") ĊĊĠ Ġk apt (" com . google . auto . service : auto - service : 1 . 0 - rc 7 ") ĊĠ Ġcompile Only (" com . google . auto . service : auto - service - annotations : 1 . 0 - rc 7 ") Ċ /* ĊĠ Ġtest Implementation (" com . github . tsch uch ort dev : kotlin - compile - testing : 1 . 2 . 6 ") ĊĠ Ġtest Implementation (" org . junit . jupiter : junit - jupiter - api : 5 . 7 . 0 ") ĊĠ Ġtest Implementation (" org . jetbrains . kotlin : kotlin - compiler ") ĊĠ Ġtest Runtime Only (" org . junit . jupiter : junit - jupiter - engine : 5 . 7 . 0 ") ĊĠ Ġtest Implementation (" org . bitbucket . m stro bel : pro cy on - compiler tools : 0 . 5 . 3 6 ") Ċ */ Ċ } Ċ Ċ /* Ċ tasks . named (" compile Kotlin ") Ġ{ Ġdepends On (" sync Source ") Ġ} Ċ tasks . register < Sync >(" sync Source ") Ġ{ ĊĠ Ġfrom ( project (": debug log - plugin "). source Sets . main . get (). all Source ) ĊĠ Ġinto (" src / main / kotlin ") ĊĠ Ġfilter Ġ{ ĊĠĠĠ Ġ// ĠReplace Ġshadow ed Ġimports Ġfrom Ġplugin Ġmodule ĊĠĠĠ Ġwhen Ġ( it ) Ġ{ ĊĠĠĠĠĠ Ġ" import Ġorg . jetbrains . kotlin . com . intellij . mock . Mock Project " Ġ-> Ġ" import Ġcom . intellij . mock . Mock Project " ĊĠĠĠĠĠ Ġelse Ġ-> Ġit ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ */ Ċ Ċ build Config Ġ{ ĊĠ ĠpackageName ( group . toString ()) ĊĠ Ġbuild Config Field (" String ", Ġ" K OT LIN _ PLUGIN _ ID ", Ġ"\" $ group .$ name \" ") Ċ } Ċ Ċ tasks . with Type < Kotlin Compile > Ġ{ ĊĠ Ġkotlin Options Ġ{ ĊĠĠĠ Ġj vm Target Ġ= Ġ" 1 . 8 " ĊĠĠĠ Ġuse IR Ġ= Ġtrue ĊĠ Ġ} Ċ } Ċ Ċ publishing Ġ{ ĊĠ Ġpublications Ġ{ ĊĠĠĠ Ġcreate < Maven Publication >(" default ") Ġ{ ĊĠĠĠĠĠ Ġfrom ( components [" java "]) ĊĠĠĠĠĠ Ġartifact ( tasks . kotlin Sources Jar ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ