/** Ċ Ġ* ĠCopyright Ġ 2 0 2 1 ĠThe Ġk age ĠAuthors . ĠAll Ġrights Ġreserved . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ċ Ġ* Ġeither Ġan ĠApache Ġ 2 . 0 Ġor ĠMIT Ġlicense Ġat Ġyour Ġdis cret ion , Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE - APACHE Ċ Ġ* Ġor ĠLICENSE - MIT Ġfiles Ġrespectively . Ċ Ġ*/ Ċ import Ġcom . github . ben man es . gradle . versions . updates . Dependency Updates Task Ċ import Ġorg . gradle . api . tasks . testing . logging . Test Log Event Ċ import Ġorg . jetbrains . kotlin . gradle . tasks . Kotlin Compile Ċ Ċ // ĠWork around Ġfor Ġfalse - positive ĠIDE Ġerrors Ċ // ĠFrom Ġhttps :// yout rack . jetbrains . com / issue / K TI J - 1 9 3 6 9 # focus = Comments - 2 7 - 5 1 8 1 0 2 7 . 0 - 0 Ċ @ Suppress (" DSL _ SCOPE _ VI OL ATION ") Ċ plugins Ġ{ ĊĠ Ġalias ( libs . plugins . kotlin . jvm ) ĊĠ Ġalias ( libs . plugins . dok ka ) ĊĠ Ġalias ( libs . plugins . spot less ) ĊĠ Ġalias ( libs . plugins . animal sn iffer ) ĊĠ Ġalias ( libs . plugins . versions ) ĊĠ Ġalias ( libs . plugins . vc u ) Ċ } Ċ Ċ fun Ġis Non Stable ( version : ĠString ): ĠBoolean Ġ{ ĊĠ Ġval Ġstable Keyword Ġ= ĠlistOf (" RELEASE ", Ġ" FINAL ", Ġ" GA "). any Ġ{ Ġversion . toUpperCase (). contains ( it ) Ġ} ĊĠ Ġval Ġregex Ġ= Ġ"^ [ 0 - 9 ,. v - ]+ (- r )? $ ". to Regex () ĊĠ Ġval Ġis Stable Ġ= Ġstable Keyword Ġ|| Ġregex . matches ( version ) ĊĠ Ġreturn Ġis Stable . not () Ċ } Ċ Ċ tasks . with Type < Kotlin Compile > Ġ{ Ġkotlin Options Ġ{ ĠmoduleName Ġ= Ġ" k age " Ġ} Ġ} Ċ Ċ tasks . with Type < Dependency Updates Task > Ġ{ ĊĠ Ġreject Version If Ġ{ Ġis Non Stable ( candidate . version ) Ġ&& Ġ! is Non Stable ( current Version ) Ġ} ĊĠ Ġcheck For Gradle Update Ġ= Ġfalse ĊĠ Ġcheck Build Environment Constraints Ġ= Ġtrue Ċ } Ċ Ċ kotlin Ġ{ Ġexplicit Api () Ġ} Ċ Ċ spot less Ġ{ ĊĠ Ġkotlin Ġ{ ĊĠĠĠ Ġkt fmt (). google Style () ĊĠĠĠ Ġtarget (" ** /*. kt ") ĊĠĠĠ Ġtarget Exclude (" **/ build /") ĊĠĠĠ Ġlicense Header File (" spot less . license ", Ġ" package ") ĊĠ Ġ} ĊĠ Ġkotlin Gradle Ġ{ ĊĠĠĠ Ġkt fmt (). google Style () ĊĠĠĠ Ġtarget (" ** /*. k ts ") ĊĠĠĠ Ġlicense Header File (" spot less . license ", Ġ" package Ġ| import | enable Feature Preview ") ĊĠ Ġ} Ċ } Ċ Ċ tasks . check Ġ{ Ġfinal ized By ( tasks . dok ka Html ) Ġ} Ċ Ċ source Sets Ġ{ Ġnamed (" main ") Ġ{ Ġjava . src Dirs (" src / kotlin ") Ġ} Ġ} Ċ Ċ dependencies Ġ{ ĊĠ Ġsignature ( libs . animal sn iffer . signature . android ) ĊĠ Ġimplementation ( libs . hk df ) ĊĠ Ġtest Implementation ( libs . kot lint est . junit ) Ċ } Ċ Ċ tasks . with Type < Test >(). configure Each Ġ{ ĊĠ Ġmax Parallel Fork s Ġ= ĠRuntime . get Runtime (). available Processors () Ġ* Ġ 2 ĊĠ Ġtest Logging Ġ{ Ġevents ( Test Log Event . PAS SED , ĠTest Log Event . SKIP PED , ĠTest Log Event . FAILED ) Ġ} ĊĠ Ġoutputs . up ToDate When Ġ{ Ġfalse Ġ} Ċ } Ċ