import Ġorg . jetbrains . kotlin . gradle . plugin . Kotlin Source Set Ċ import Ġorg . jetbrains . kotlin . gradle . tasks . Kotlin Compile Ċ Ċ plugins Ġ{ ĊĠĠĠ Ġidea ĊĠĠĠ Ġ` java - library ` ĊĠĠĠ Ġid (" org . jetbrains . kotlin . jvm ") ĊĠĠĠ Ġid (" org . jetbrains . dok ka ") ĊĠĠĠ Ġid (" org . junit . platform . gradle . plugin ") ĊĠĠĠ Ġj aco co ĊĠĠĠ Ġid (" de . f uer sten au . build config ") Ġversion Ġ" 1 . 1 . 8 " Ċ } Ċ Ċ source Sets Ġ{ ĊĠĠĠ Ġcreate (" integration Test ") Ġ{ ĊĠĠĠĠĠĠĠ Ġcompile Classpath Ġ+= Ġsource Sets [" main "]. output ĊĠĠĠĠĠĠĠ Ġcompile Classpath Ġ+= Ġsource Sets [" test "]. output ĊĠĠĠĠĠĠĠ Ġcompile Classpath Ġ+= Ġconfigurations . test Compile Classpath ĊĊĠĠĠĠĠĠĠ Ġruntime Classpath Ġ+= Ġsource Sets [" main "]. output ĊĠĠĠĠĠĠĠ Ġruntime Classpath Ġ+= Ġsource Sets [" test "]. output ĊĠĠĠĠĠĠĠ Ġruntime Classpath Ġ+= Ġconfigurations . test Runtime Classpath ĊĠĠĠĠĠĠĠ Ġwith Convention ( Kotlin Source Set :: class ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġkotlin . src Dirs (" src / integration Test / kotlin ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ build Config Ġ{ ĊĠĠĠ ĠappName Ġ= Ġproject . name ĊĠĠĠ Ġversion Ġ= ĠVersions . mar athon ĊĠĠĠ Ġbuild Config Field (" String ", Ġ" BUG SN AG _ TOKEN ", ĠSystem . getenv (" BUG SN AG _ TOKEN ")) Ċ } Ċ Ċ dependencies Ġ{ ĊĠĠĠ Ġimplementation ( project (": report : html - report ")) ĊĠĠĠ Ġimplementation ( project (": report : execution - timeline ")) ĊĊĠĠĠ Ġimplementation ( Libraries . all ure ) ĊĠĠĠ Ġimplementation ( Libraries . all ure Environment ) ĊĊĠĠĠ Ġimplementation ( project (": analytics : usage ")) ĊĠĠĠ Ġimplementation ( Libraries . gson ) ĊĠĠĠ Ġimplementation ( Libraries . jackson Annotations ) ĊĠĠĠ Ġimplementation ( Libraries . apache Common s Text ) ĊĠĠĠ Ġimplementation ( Libraries . apache Common s IO ) ĊĠĠĠ Ġimplementation ( Libraries . kotlin Std Lib ) ĊĠĠĠ Ġimplementation ( Libraries . kotlin Cor outines ) ĊĠĠĠ Ġimplementation ( Libraries . kotlin Logging ) ĊĠĠĠ Ġimplementation ( Libraries . slf 4 j API ) ĊĠĠĠ Ġimplementation ( Libraries . log back Classic ) ĊĠĠĠ Ġimplementation ( Libraries . influx Db Client ) ĊĠĠĠ Ġapi ( Libraries . k oin ) ĊĠĠĠ Ġapi ( Libraries . bug sn ag ) ĊĠĠĠ Ġtest Implementation ( project (": vendor : vendor - test ")) ĊĠĠĠ Ġtest Implementation ( Test Libraries . junit 5 ) ĊĠĠĠ Ġtest Implementation ( Test Libraries . k lu ent ) ĊĠĠĠ Ġtest Implementation ( Test Libraries . test Containers ) ĊĠĠĠ Ġtest Implementation ( Test Libraries . test Containers In flux ) ĊĠĠĠ Ġtest Implementation ( Test Libraries . mockito Kotlin ) ĊĠĠĠ Ġtest Implementation ( Test Libraries . k oin ) ĊĠĠĠ Ġtest Runtime ( Test Libraries . jupiter Engine ) Ċ } Ċ Ċ tasks . named < J aco co Report >(" jac oco Test Report "). configure Ġ{ ĊĠĠĠ Ġreports . xml . isEnabled Ġ= Ġtrue ĊĠĠĠ Ġreports . html . isEnabled Ġ= Ġtrue ĊĠĠĠ Ġdepends On ( tasks . named (" test ")) Ċ } Ċ Ċ val Ġintegration Test Ġ= Ġtask < Test >(" integration Test ") Ġ{ ĊĠĠĠ Ġdescription Ġ= Ġ" Runs Ġintegration Ġtests ." ĊĠĠĠ Ġgroup Ġ= Ġ" verification " ĊĊĠĠĠ Ġtest Classes Dirs Ġ= Ġsource Sets [" integration Test "]. output . classes Dirs ĊĠĠĠ Ġclasspath Ġ= Ġsource Sets [" integration Test "]. runtime Classpath ĊĊĠĠĠ Ġexclude (" **/ resources /** ") ĊĊĠĠĠ Ġshould Run After (" test ") Ċ } Ċ Ċ tasks . with Type < Test >(). all Ġ{ ĊĠĠĠ Ġtasks . get ByName (" check "). depends On ( this ) ĊĠĠĠ Ġuse JUnit Platform () Ċ } Ċ Ċ junit Platform Ġ{ ĊĠĠĠ Ġenable Standard Test Task Ġ= Ġtrue Ċ } Ċ Ċ tasks . get ByName (" junit Platform Test "). outputs . up ToDate When Ġ{ Ġfalse Ġ} Ċ tasks . get ByName (" test "). outputs . up ToDate When Ġ{ Ġfalse Ġ} Ċ Ċ Deployment . initialize ( project ) Ċ Ċ tasks . with Type < Kotlin Compile > Ġ{ ĊĠĠĠ Ġkotlin Options . jvm Target Ġ= Ġ" 1 . 8 " ĊĠĠĠ Ġkotlin Options . apiVersion Ġ= Ġ" 1 . 3 " Ċ } Ċ