package Ġuk . gov . just ice . digital . h mp ps . gradle . plugin managers Ċ Ċ import Ġorg . gradle . api . Project Ċ import Ġorg . springframework . boot . gradle . dsl . SpringBoot Extension Ċ import Ġorg . springframework . boot . gradle . plugin . SpringBoot Plugin Ċ import Ġorg . springframework . boot . gradle . tasks . bund ling . Boot Jar Ċ import Ġuk . gov . just ice . digital . h mp ps . gradle . PluginManager Ċ import Ġjava . net . Inet Address Ċ import Ġjava . time . Instant Ċ Ċ class ĠSpring Boot PluginManager ( override Ġval Ġproject : ĠProject ) Ġ: ĠPlugin Manager < SpringBoot Plugin > Ġ{ ĊĊĠ Ġoverride Ġfun Ġconfigure () Ġ{ ĊĠĠĠ Ġadd Dependencies () ĊĠĠĠ Ġset SpringBoot Info () ĊĠĠĠ Ġset Manifest Attributes () ĊĠĠĠ Ġdisable Jar Task () ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġadd Dependencies () Ġ{ ĊĠĠĠ Ġproject . dependencies . add (" implementation ", Ġ" org . springframework . boot : spring - boot - starter - web ") ĊĠĠĠ Ġproject . dependencies . add (" implementation ", Ġ" org . springframework . boot : spring - boot - starter - act uator ") ĊĠĠĠ Ġproject . dependencies . add (" implementation ", Ġ" org . springframework . boot : spring - boot - starter - validation ") ĊĠĠĠ Ġproject . dependencies . add (" implementation ", Ġ" com . github . t imp e et ers : spring - boot - grace ful - shutdown : 2 . 2 . 2 ") ĊĊĠĠĠ Ġproject . dependencies . add (" test Implementation ", Ġ" org . springframework . boot : spring - boot - starter - test ") ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġset SpringBoot Info () Ġ{ ĊĠĠĠ Ġval Ġsb Extension Ġ= Ġproject . extensions . get ByName (" spring Boot ") Ġas ĠSpring Boot Extension ĊĠĠĠ Ġsb Extension . build Info Ġ{ Ġbuild Info Ġ-> ĊĠĠĠĠĠ Ġbuild Info . properties Ġ{ Ġbuild Info Props Ġ-> ĊĠĠĠĠĠĠĠ Ġbuild Info Props . time Ġ= ĠInstant . now () ĊĠĠĠĠĠĠĠ Ġbuild Info Props . additional Ġ= Ġget Additional Build Info () ĊĠĠĠĠĠĠĠ Ġbuild Info Props . version Ġ= Ġproject . version . toString () ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġget Additional Build Info (): ĠMap < String , ĠString > Ġ{ ĊĠĠĠ Ġreturn Ġmap Of ( ĊĠĠĠĠĠ Ġ" by " Ġto ĠSystem . getProperty (" user . name "), ĊĠĠĠĠĠ Ġ" operating System " Ġto Ġ"${ System . getProperty (" os . name ")} Ġ(${ System . getProperty (" os . version ") })", ĊĠĠĠĠĠ Ġ" machine " Ġto ĠInet Address . getLocal Host (). host Name ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġdisable Jar Task () Ġ{ ĊĠĠĠ Ġproject . tasks . get ByName (" jar "). enabled Ġ= Ġfalse ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġset Manifest Attributes () Ġ{ ĊĠĠĠ Ġval Ġmanifest Ġ= Ġ( project . tasks . get ByName (" boot Jar ") Ġas ĠBoot Jar ). manifest ĊĠĠĠ Ġmanifest . attributes [" Implementation - Version "] Ġ= Ġproject . version ĊĠĠĠ Ġmanifest . attributes [" Implementation - Title "] Ġ= Ġproject . name ĊĠ Ġ} Ċ } Ċ