import Ġorg . gradle . api . internal . Has Convention Ċ import Ġorg . gradle . api . tasks . bund ling . Jar Ċ import Ġorg . jetbrains . kotlin . gradle . plugin . Kotlin Source Set Ċ import Ġorg . jetbrains . kotlin . gradle . tasks . Kotlin Compile Ċ import Ġorg . junit . platform . gradle . plugin . En gin es Extension Ċ import Ġorg . junit . platform . gradle . plugin . Filters Extension Ċ import Ġorg . junit . platform . gradle . plugin . JUnit Platform Extension ĊĊ Ċ description Ġ= Ġ" A ĠJSON Ġlibrary Ġwritten Ġin Ġpure ĠKotlin ." Ċ group Ġ= Ġ" com . github . u cot ta " Ċ version Ġ= Ġ" 0 . 9 . 2 " ĊĊ Ċ plugins Ġ{ Ċ ĉ kotlin (" jvm ") Ġversion Ġ" 1 . 1 . 6 0 " Ċ ĉ jac oco Ċ ĉ ` java - library ` Ċ ĉ maven Ċ ĉ ` maven - publish ` Ċ ĉ signing Ċ ĉ id (" com . github . ben - man es . versions ") Ġversion Ġ" 0 . 1 7 . 0 " Ċ ĉ id (" org . junit . platform . gradle . plugin ") Ġversion Ġ" 1 . 0 . 2 " Ċ } ĊĊ Ċ java Ġ{ Ċ ĉ source Compatibility Ġ= ĠJava Version . VERSION _ 1 _ 8 Ċ ĉ target Compatibility Ġ= ĠJava Version . VERSION _ 1 _ 8 ĊĊ ĉ source Sets Ġ{ Ċĉ ĉ " examples " Ġ{ Ċĉĉ ĉ kotlin . src Dirs (" Examples ") Ċĉ ĉ } ĊĊĉ ĉ " main " Ġ{ Ċĉĉ ĉ kotlin . src Dirs (" Sources ") Ċĉ ĉ } ĊĊĉ ĉ " test " Ġ{ Ċĉĉ ĉ kotlin . src Dirs (" Tests / Sources ") Ċĉĉ ĉ resources . src Dirs (" Tests / Resources ") Ċĉ ĉ } Ċ ĉ } Ċ } Ċ Ċ junit Platform Ġ{ Ċ ĉ platform Version Ġ= Ġ" 1 . 0 . 2 " ĊĊ ĉ filters Ġ{ Ċĉ ĉ engines Ġ{ Ċĉĉ ĉ include (" spe k ") Ċĉ ĉ } Ċ ĉ } Ċ } Ċ Ċ tasks Ġ{ Ċ ĉ with Type < Kotlin Compile > Ġ{ Ċĉ ĉ source Compatibility Ġ= Ġ" 1 . 8 " Ċĉ ĉ target Compatibility Ġ= Ġ" 1 . 8 " ĊĊĉ ĉ kotlin Options . jvm Target Ġ= Ġ" 1 . 8 " Ċ ĉ } Ċ } Ċ Ċ after Evaluate Ġ{ Ċ ĉ val Ġjunit Platform Test : ĠJava Exec Ġby Ġtasks ĊĊ ĉ jac oco Ġ{ Ċĉ ĉ apply To ( junit Platform Test ) Ċ ĉ } ĊĊ ĉ task < J aco co Report >(" ${ junit Platform Test . name } Report ") Ġ{ Ċĉ ĉ execution Data ( junit Platform Test ) ĊĊĉ ĉ val Ġsource Set Ġ= Ġjava . source Sets [" main "] Ċĉ ĉ source Directories Ġ= Ġfiles ( source Set . all Java . src Dirs ) Ċĉ ĉ class Directories Ġ= Ġfiles ( source Set . output ) ĊĊĉ ĉ reports Ġ{ Ċĉĉ ĉ xml . destination Ġ= Ġfile ("$ build Dir / reports / jac oco . xml ") Ċĉĉ ĉ xml . isEnabled Ġ= Ġtrue Ċĉĉ ĉ html . isEnabled Ġ= Ġfalse Ċĉ ĉ } ĊĊĉ ĉ tasks [" check "]. depends On ( this ) Ċ ĉ } Ċ } Ċ Ċ dependencies Ġ{ Ċ ĉ api ( kotlin (" reflect ", Ġ" 1 . 1 . 6 0 ")) Ċ ĉ api ( kotlin (" stdlib - jre 8 ", Ġ" 1 . 1 . 6 0 ")) ĊĊ ĉ test Implementation (" com . w inter be : ex pe kt : 0 . 5 . 0 ") Ċ ĉ test Implementation (" org . jetbrains . spe k : spe k - subject - extension : 1 . 1 . 5 ") Ċ ĉ test Runtime (" org . jetbrains . spe k : spe k - junit - platform - engine : 1 . 1 . 5 ") Ċ ĉ test Runtime (" org . junit . platform : junit - platform - runner :${ junit Platform . platform Version }") ĊĊ ĉ " examples Implementation "( java . source Sets [" main "]. output ) Ċ } Ċ Ċ configurations [" examples Implementation "]. extends From ( configurations [" api "]) Ċ configurations . all Ġ{ Ċ ĉ resolution Strategy . apply Ġ{ Ċĉ ĉ force (" org . jetbrains . kotlin : kotlin - reflect : 1 . 1 . 6 0 ") Ċĉ ĉ force (" org . jetbrains . kotlin : kotlin - stdlib : 1 . 1 . 6 0 ") ĊĊĉ ĉ fail On Version Conflict () Ċ ĉ } Ċ } Ċ Ċ repositories Ġ{ Ċ ĉ j center () Ċ ĉ maven Central () Ċ } ĊĊ Ċ // Ġextension Ġfor Ġconfiguration Ċ fun ĠJ Unit Platform Extension . filters ( setup : ĠFilters Extension . () Ġ-> ĠUnit ) Ġ{ Ċ ĉ when Ġ( this ) Ġ{ Ċĉ ĉ is ĠExtension Aware Ġ-> Ġextensions . getBy Type ( Filters Extension :: class . java ). setup () Ċĉ ĉ else Ġ-> Ġthrow ĠException ("${ this :: class } Ġmust Ġbe Ġan Ġinstance Ġof ĠExtension Aware ") Ċ ĉ } Ċ } Ċ Ċ fun ĠFilters Extension . engines ( setup : ĠEng ines Extension . () Ġ-> ĠUnit ) Ġ{ Ċ ĉ when Ġ( this ) Ġ{ Ċĉ ĉ is ĠExtension Aware Ġ-> Ġextensions . getBy Type ( En gin es Extension :: class . java ). setup () Ċĉ ĉ else Ġ-> Ġthrow ĠException ("${ this :: class } Ġmust Ġbe Ġan Ġinstance Ġof ĠExtension Aware ") Ċ ĉ } Ċ } Ċ Ċ val ĠSource Set . kotlin Ġget () Ġ= Ġ( this Ġas ĠHas Convention ). convention . get Plugin < Kotlin Source Set >(). kotlin ĊĊ Ċ // Ġpublishing Ċ Ċ val Ġjavadoc Ġ= Ġtasks [" javadoc "] Ġas ĠJ avadoc Ċ val Ġjavadoc Jar Ġby Ġtasks . creating ( Jar :: class ) Ġ{ Ċ ĉ classifier Ġ= Ġ" javadoc " Ċ ĉ from ( javadoc ) Ċ } Ċ Ċ val Ġsources Jar Ġby Ġtasks . creating ( Jar :: class ) Ġ{ Ċ ĉ classifier Ġ= Ġ" sources " Ċ ĉ from ( java . source Sets [" main "]. all Source ) Ċ } Ċ Ċ publishing Ġ{ Ċ ĉ ( publications ) Ġ{ Ċĉ ĉ " default ". invoke ( Maven Publication :: class ) Ġ{ Ċĉĉ ĉ from ( components [" java "]) Ċĉĉ ĉ artifact ( sources Jar ) Ċĉ ĉ } Ċ ĉ } Ċ } Ċ Ċ val Ġoss rh UserName Ġ= Ġfind Property (" oss rh UserName ") Ġas ĠString ? Ċ val Ġoss rh Password Ġ= Ġfind Property (" oss rh Password ") Ġas ĠString ? Ċ if Ġ( oss rh UserName Ġ!= Ġnull Ġ&& Ġoss rh Password Ġ!= Ġnull ) Ġ{ Ċ ĉ artifacts Ġ{ Ċĉ ĉ add (" archives ", Ġjavadoc Jar ) Ċĉ ĉ add (" archives ", Ġsources Jar ) Ċ ĉ } ĊĊ ĉ signing Ġ{ Ċĉ ĉ sign ( configurations . archives ) Ċ ĉ } ĊĊ ĉ tasks Ġ{ Ċĉ ĉ " upload Arch ives "( Upload :: class ) Ġ{ Ċĉĉ ĉ repositories Ġ{ Ċĉĉĉ ĉ with Convention ( Maven Repository Handler Convention :: class ) Ġ{ Ċĉĉĉĉ ĉ maven Deploy er Ġ{ Ċĉĉĉĉĉ ĉ with Gro ovy Builder Ġ{ Ċĉĉĉĉĉĉ ĉ " before Deployment " Ġ{ Ġsigning . sign P om ( delegate Ġas ĠMaven Deployment ) Ġ} ĊĊĉĉĉĉĉĉ ĉ " repository " (" url " Ġto Ġ" https :// oss . son atype . org / service / local / staging / deploy / maven 2 /") Ġ{ Ċĉĉĉĉĉĉĉ ĉ " authentication " (" userName " Ġto Ġoss rh UserName , Ġ" password " Ġto Ġoss rh Password ) Ċĉĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉĉ ĉ " snapshot Repository " (" url " Ġto Ġ" https :// oss . son atype . org / content / repositories / snapshots /") Ġ{ Ċĉĉĉĉĉĉĉ ĉ " authentication " (" userName " Ġto Ġoss rh UserName , Ġ" password " Ġto Ġoss rh Password ) Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉ ĉ } ĊĊĉĉĉĉĉ ĉ pom . project Ġ{ Ċĉĉĉĉĉĉ ĉ with Gro ovy Builder Ġ{ Ċĉĉĉĉĉĉĉ ĉ " name "( project . name ) Ċĉĉĉĉĉĉĉ ĉ " description "( project . description ) Ċĉĉĉĉĉĉĉ ĉ " packaging " (" jar ") Ċĉĉĉĉĉĉĉ ĉ " url " (" https :// github . com / fluid sonic / fluid - json ") Ċĉĉĉĉĉĉĉ ĉ " developers " Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ " developer " Ġ{ Ċĉĉĉĉĉĉĉĉĉ ĉ " id " (" fluid sonic ") Ċĉĉĉĉĉĉĉĉĉ ĉ " name " (" Mar c ĠK na up ") Ċĉĉĉĉĉĉĉĉĉ ĉ " email " (" mar c @ k na up . ko eln ") Ċĉĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉ ĉ " licenses " Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ " license " Ġ{ Ċĉĉĉĉĉĉĉĉĉ ĉ " name " (" MIT ĠLicense ") Ċĉĉĉĉĉĉĉĉĉ ĉ " url " (" https :// github . com / fluid sonic / fluid - json / blob / master / LICENSE ") Ċĉĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉĉ ĉ " scm " Ġ{ Ċĉĉĉĉĉĉĉĉ ĉ " connection " (" scm : git : https :// github . com / fluid sonic / fluid - json . git ") Ċĉĉĉĉĉĉĉĉ ĉ " developer Connection " (" scm : git : git @ github . com : fluid sonic / fluid - json . git ") Ċĉĉĉĉĉĉĉĉ ĉ " url " (" https :// github . com / fluid sonic / fluid - json ") Ċĉĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉĉ ĉ } Ċĉĉĉĉĉ ĉ } Ċĉĉĉĉ ĉ } Ċĉĉĉ ĉ } Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } Ċ } Ċ