group Ġ= Ġ" org . nic ok osi " Ċ version Ġ= Ġ" 1 . 0 - SNAPSHOT " Ċ description Ġ= Ġ" A Ġbasic ĠJava Ġproject Ġwith Ġtest Ġlibraries Ġfor Ġkat as " Ċ Ċ plugins Ġ{ ĊĠ Ġid (" com . ad ar shr . test - logger ") Ġversion Ġ(" 2 . 0 . 0 ") ĊĠ Ġid (" java ") ĊĠ Ġid (" se . pat ri ker des . use - latest - versions ") Ġversion Ġ(" 0 . 2 . 1 7 ") ĊĠ Ġid (" com . github . ben - man es . versions ") Ġversion Ġ(" 0 . 3 9 . 0 ") Ċ } Ċ Ċ java Ġ{ ĊĠ Ġsource Compatibility Ġ= ĠJava Version . VERSION _ 1 7 ĊĠ Ġtarget Compatibility Ġ= ĠJava Version . VERSION _ 1 7 Ċ } Ċ Ċ tasks . compile Java Ġ{ ĊĠ Ġoptions . compiler Args . add ("-- enable - preview ") Ċ } Ċ Ċ tasks . compile Test Java Ġ{ ĊĠ Ġoptions . compiler Args . add ("-- enable - preview ") Ċ } Ċ Ċ tasks . test Ġ{ ĊĠ Ġuse JUnit Platform () ĊĠ Ġj vm Args ("-- enable - preview ") Ċ } Ċ Ċ repositories Ġ{ ĊĠ Ġmaven Central () Ċ } Ċ Ċ dependencies Ġ{ ĊĠ Ġtest Implementation (" org . junit . jupiter ", Ġ" junit - jupiter - api ", Ġ" 5 . 7 . 2 ") ĊĠ Ġtest Implementation (" org . junit . jupiter ", Ġ" junit - jupiter - params ", Ġ" 5 . 7 . 2 ") ĊĠ Ġtest Implementation (" org . junit . jupiter ", Ġ" junit - jupiter - engine ", Ġ" 5 . 7 . 2 ") ĊĠ Ġtest Implementation (" org . assertj ", Ġ" assertj - core ", Ġ" 3 . 2 0 . 2 ") ĊĠ Ġtest Implementation (" org . mockito ", Ġ" mockito - core ", Ġ" 3 . 1 2 . 1 ") ĊĠ Ġtest Implementation (" net . jq wik ", Ġ" jq wik ", Ġ" 1 . 5 . 4 ") Ċ } Ċ Ċ tasks . with Type < Test > Ġ{ ĊĠ Ġuse JUnit Platform () Ċ } Ċ Ċ 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 < com . github . ben man es . gradle . versions . updates . Dependency Updates Task > Ġ{ ĊĠ Ġreject Version If Ġ{ ĊĠĠĠ Ġis Non Stable ( candidate . version ) ĊĠ Ġ} Ċ } Ċ