import Ġcom . github . jen gel man . gradle . plugins . shadow . tasks . Shadow Jar Ċ import Ġcom . g ory len ko . Generate Git Properties Task Ċ import Ġcom . g ory len ko . Git Properties Plugin Extension Ċ Ċ import Ġio . mic ronaut . gradle . gra al vm . Native Image Task Ċ import Ġorg . gradle . internal . os . Operating System Ċ Ċ plugins Ġ{ ĊĠĠĠ Ġapplication ĊĠĠĠ Ġid (" com . github . john ren gel man . shadow ") ĊĠĠĠ Ġid (" com . g ory len ko . gradle - git - properties ") ĊĠĠĠ Ġid (" mic ronaut - application - con ventions ") Ċ } Ċ Ċ dependencies Ġ{ ĊĠĠĠ Ġannotation Processor (" org . project lo mbok : lo mbok :${ libs . versions . lo mbok . get () }") ĊĠĠĠ Ġcompile Only (" org . project lo mbok : lo mbok :${ libs . versions . lo mbok . get () }") ĊĊĠĠĠ Ġannotation Processor (" io . mic ronaut . openapi : mic ronaut - openapi ") ĊĊĠĠĠ Ġcompile Only (" com . google . code . find bugs : js r 3 0 5 ") ĊĊĠĠĠ Ġimplementation ( project (": service - bus ")) ĊĠĠĠ Ġimplementation ( project (": service - api ")) ĊĊĠĠĠ Ġimplementation (" io . mic ronaut : mic ronaut - http - client ") ĊĠĠĠ Ġimplementation (" io . mic ronaut : mic ronaut - http - server - netty ") ĊĠĠĠ Ġimplementation (" io . mic ronaut : mic ronaut - inject ") ĊĠĠĠ Ġimplementation (" io . mic ronaut : mic ronaut - management ") ĊĠĠĠ Ġimplementation (" io . mic ronaut : mic ronaut - runtime ") ĊĠĠĠ Ġimplementation (" io . mic ronaut : mic ronaut - validation ") ĊĠĠĠ Ġimplementation (" io . mic ronaut . data : mic ronaut - data - hibernate - jpa ") ĊĠĠĠ Ġimplementation (" io . mic ronaut . li quibase : mic ronaut - li quibase ") ĊĠĠĠ Ġimplementation (" io . mic ronaut . micro meter : mic ronaut - micro meter - core ") ĊĠĠĠ Ġimplementation (" io . mic ronaut . micro meter : mic ronaut - micro meter - registry - prometheus ") ĊĠĠĠ Ġimplementation (" io . mic ronaut . reactor : mic ronaut - reactor ") ĊĠĠĠ Ġimplementation (" io . mic ronaut . security : mic ronaut - security ") ĊĠĠĠ Ġimplementation (" io . mic ronaut . sql : mic ronaut - jdbc - hikari ") ĊĊĠĠĠ Ġimplementation (" io . json web token : jj wt - api :${ libs . versions . jwt . get () }") ĊĠĠĠ Ġimplementation (" io . swagger . core . v 3 : swagger - annotations ") ĊĠĠĠ Ġimplementation (" javax . annotation : javax . annotation - api ") ĊĠĠĠ Ġimplementation (" javax . inject : javax . inject : 1 ") ĊĠĠĠ Ġimplementation (" org . slf 4 j : jul - to - slf 4 j :${ libs . versions . slf 4 j . get () }") ĊĊĠĠĠ Ġruntime Only (" ch . qos . log back : log back - classic :${ libs . versions . log back . get () }") ĊĠĠĠ Ġruntime Only (" com . h 2 database : h 2 ") ĊĠĠĠ Ġruntime Only (" io . json web token : jj wt - impl :${ libs . versions . jwt . get () }") ĊĠĠĠ Ġruntime Only (" io . json web token : jj wt - jackson :${ libs . versions . jwt . get () }") ĊĊĠĠĠ Ġtest Annotation Processor (" io . mic ronaut : mic ronaut - inject - java ") ĊĊĠĠĠ Ġtest Implementation (" io . mic ronaut . test : mic ronaut - test - junit 5 ") ĊĠĠĠ Ġtest Implementation (" org . assertj : assertj - core :${ libs . versions . assertj . get () }") ĊĠĠĠ Ġtest Implementation (" org . mockito : mockito - core :${ libs . versions . mockito . get () }") ĊĠĠĠ Ġtest Implementation (" org . junit . jupiter : junit - jupiter - api ") ĊĠĠĠ Ġtest Runtime Only (" org . junit . jupiter : junit - jupiter - engine ") ĊĊĠĠĠ Ġ" int Test Annotation Processor "( platform (" io . mic ronaut : mic ronaut - bom :${ libs . versions . mn . get ()} ")) ĊĠĠĠ Ġ" int Test Annotation Processor " (" io . mic ronaut : mic ronaut - inject - java ") ĊĊĠĠĠ Ġ" int Test Annotation Processor " (" org . project lo mbok : lo mbok :${ libs . versions . lo mbok . get () }") ĊĠĠĠ Ġ" int Test Compile Only " (" org . project lo mbok : lo mbok :${ libs . versions . lo mbok . get () }") ĊĊĠĠĠ Ġ" int Test Compile Only " (" com . google . code . find bugs : js r 3 0 5 ") Ċ } Ċ Ċ configure < Git Properties Plugin Extension > Ġ{ ĊĠĠĠ Ġkeys Ġ= ĠlistOf (" git . branch ", Ġ" git . commit . id ", Ġ" git . commit . id . abbrev ", Ġ" git . commit . time ") Ċ } Ċ Ċ application Ġ{ ĊĠĠĠ Ġmain Class . set (" com . github . al . real world . App ") Ċ } Ċ Ċ tasks Ġ{ ĊĠĠĠ Ġregister < Copy >(" copy Open Api Config ") Ġ{ ĊĠĠĠĠĠĠĠ Ġfrom ( root Project . file (" openapi . properties ")) ĊĠĠĠĠĠĠĠ Ġdestination Dir Ġ= Ġroot Project . build Dir ĊĠĠĠĠĠĠĠ Ġexpand ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmap Of ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" name " Ġto Ġroot Project . name , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" version " Ġto Ġroot Project . version , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" description " Ġto Ġroot Project . description ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġnamed < Generate Git Properties Task >(" generate Git Properties ") Ġ{ ĊĠĠĠĠĠĠĠ Ġonly If Ġ{ Ġ! source . isEmpty Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġnamed < Java Compile >(" compile Java ") Ġ{ ĊĠĠĠĠĠĠĠ Ġoptions . is Fork Ġ= Ġtrue ĊĠĠĠĠĠĠĠ Ġoptions . fork Options . jvm Args Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠlistOf ("- D mic ronaut . openapi . config . file =${ root Project . file (" build / openapi . properties ") }") ĊĠĠĠĠĠĠĠ Ġdepends On (" copy Open Api Config ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġnamed < Shadow Jar >(" shadow Jar ") Ġ{ ĊĠĠĠĠĠĠĠ Ġarchive FileName . set ("${ root Project . name }-${ archive Version . get ()}. ${ archive Extension . get () }") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġwith Type < Native Image Task > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġos Ġ= ĠOperating System . current () ĊĠĠĠĠĠĠĠ Ġimage Name . set ("${ root Project . name }-${ version }-${ os . native Prefix }${ os . executable Suffix }") ĊĠĠĠĠĠĠĠ Ġverbose ( true ) ĊĠĠĠĠĠĠĠ Ġif Ġ( os . is Windows ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġexecutable (" native - image . cmd ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// Ġused Ġby ĠHeroku ĊĠĠĠ Ġregister (" stage ") Ġ{ ĊĠĠĠĠĠĠĠ Ġdepends On (" clean ", Ġ" build ") ĊĠĠĠĠĠĠĠ Ġmust Run After (" clean ") ĊĠĠĠ Ġ} Ċ }