import Ġde . under couch . gradle . tasks . download . Download Ċ Ċ plugins Ġ{ ĊĠĠĠ Ġid (" org . springframework . boot ") Ġversion Ġ" 2 . 4 . 3 " ĊĠĠĠ Ġid (" io . spring . dependency - management ") Ġversion Ġ" 1 . 0 . 1 0 . RELEASE " ĊĠĠĠ Ġid (" de . under couch . download ") Ġversion Ġ" 4 . 1 . 1 " Ċ } Ċ Ċ // ĠMain Ġsource Ġset Ġcompiles Ġagainst Ġjava Ġ 8 Ċ tasks . with Type < Java Compile >(). configure Each Ġ{ ĊĠĠĠ Ġjava Compiler . set ( java Tool chains . compiler For Ġ{ ĊĠĠĠĠĠĠĠ Ġlanguage Version . set ( Java Language Version . of ( 8 )) ĊĠĠĠ Ġ}) Ċ } Ċ Ċ // ĠTest Ġsource Ġset Ġcompiles Ġagainst Ġjava Ġ 1 1 Ċ tasks . named < Java Compile >(" compile Test Java ") Ġ{ ĊĠĠĠ Ġjava Compiler . set ( java Tool chains . compiler For Ġ{ ĊĠĠĠĠĠĠĠ Ġlanguage Version . set ( Java Language Version . of ( 1 1 )) ĊĠĠĠ Ġ}) Ċ } Ċ Ċ configurations Ġ{ ĊĠĠĠ Ġtest Implementation Ġ{ ĊĠĠĠĠĠĠĠ Ġresolution Strategy . force (" junit : junit : 4 . 1 3 . 1 ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġimplementation Ġ{ ĊĠĠĠĠĠĠĠ Ġexclude ( module Ġ= Ġ" spring - boot - starter - logging ") ĊĠĠĠ Ġ} Ċ } Ċ Ċ dependencies Ġ{ ĊĠĠĠ Ġimplementation (" org . springframework . boot : spring - boot - starter - web ") ĊĠĠĠ Ġimplementation (" org . springframework . boot : spring - boot - starter - log 4 j 2 ") ĊĠĠĠ Ġtest Implementation (" org . test containers : test containers : 1 . 1 5 . 1 ") ĊĠĠĠ Ġtest Implementation (" com . squareup . okhttp 3 : okhttp : 3 . 1 2 . 1 2 ") Ċ } Ċ Ċ tasks . test Ġ{ ĊĠĠĠ Ġenabled Ġ= Ġfalse Ċ } Ċ Ċ // ĠThe Ġj fr - agent - extension Ġs moke Ġtest Ġrelies Ġon Ġrunning Ġan Ġapp Ġwith Ġthe Ġnew Ġre lic Ġjava Ġagent . Ċ // ĠThese Ġtasks Ġdownload Ġand Ġunzip Ġit Ġso Ġthat Ġthe Ġtest Ġcan Ġconsume Ġit . Ċ task < Download >(" download New Rel ic ") Ġ{ ĊĠĠĠ Ġsrc (" https :// download . new relic . com / new relic / java - agent / new relic - agent / current / new relic - java . zip ") ĊĠĠĠ Ġdest ( project . build Dir . toString () Ġ+ Ġ"/ new relic / new relic - java . zip ") Ċ } Ċ Ċ task < Copy >(" unzip New Rel ic ") Ġ{ ĊĠĠĠ Ġfrom ( zip Tree ( project . build Dir . toString () Ġ+ Ġ"/ new relic / new relic - java . zip ")) ĊĠĠĠ Ġinto ( project . build Dir . toString ()) ĊĠĠĠ Ġdepends On (" download New Rel ic ") Ċ } Ċ Ċ task < Test >(" smoke Test ") Ġ{ ĊĠĠĠ Ġdescription Ġ= Ġ" Runs Ġs moke Ġtests ." ĊĠĠĠ Ġgroup Ġ= Ġ" verification " ĊĊĠĠĠ Ġsystem Property (" PROJECT _ ROOT _ DIR ", Ġproject . rootDir . toString ()) ĊĠĠĠ Ġsystem Property (" S MO KE _ TESTS _ BUILD _ LIBS _ DIR ", Ġproject . build Dir . toString () Ġ+ Ġ"/ libs ") ĊĠĠĠ Ġsystem Property (" NEW _ RE LIC _ JAVA _ AGENT _ DIR ", Ġproject . build Dir . toString () Ġ+ Ġ"/ new relic ") ĊĠĠĠ Ġsystem Property (" J FR _ DA EM ON _ BUILD _ LIBS _ DIR ", Ġproject (": j fr - daemon "). build Dir . toString () Ġ+ Ġ"/ libs ") ĊĠĠĠ Ġsystem Property (" J FR _ AGENT _ EXTENSION _ BUILD _ LIBS _ DIR ", Ġproject (": j fr - agent - extension "). build Dir . toString () Ġ+ Ġ"/ libs ") ĊĊĠĠĠ Ġuse JUnit Platform () ĊĊĠĠĠ Ġdepends On ( tasks . boot Jar ) ĊĠĠĠ Ġdepends On ( project (": j fr - daemon "). tasks [" shadow Jar "]) ĊĠĠĠ Ġdepends On ( project (": j fr - agent - extension "). tasks [" shadow Jar "]) ĊĠĠĠ Ġdepends On ( tasks [" unzip New Rel ic "]) ĊĊĠĠĠ Ġtest Classes Dirs Ġ= Ġsource Sets [" test "]. output . classes Dirs ĊĠĠĠ Ġclasspath Ġ= Ġsource Sets [" test "]. runtime Classpath Ċ } Ċ