package Ġnet . tw ister rob . gradle . root Ċ Ċ import Ġnet . tw ister rob . gradle . Base Int g Test Ċ import Ġnet . tw ister rob . gradle . test . Gradle Runner Rule Ċ import Ġnet . tw ister rob . gradle . test . Gradle Runner Rule Extension Ċ import Ġnet . tw ister rob . gradle . test . assert Skipped Ċ import Ġnet . tw ister rob . gradle . test . assert Success Ċ import Ġnet . tw ister rob . gradle . test . assert Up ToDate Ċ import Ġnet . tw ister rob . gradle . test . root Ċ import Ġorg . hamcrest . Matcher Assert . assertThat Ċ import Ġorg . hamcrest . Matchers . not Ċ import Ġorg . hamcrest . assume That Ċ import Ġorg . hamcrest . io . File Matchers . an Existing File Ċ import Ġorg . intellij . lang . annotations . Language Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . extension . Extend With Ċ Ċ /** Ċ Ġ* Ġ@ see ĠGradle Plugin Ċ Ġ*/ Ċ @ Extend With ( Gradle Runner Rule Extension :: class ) Ċ class ĠGradle Plugin Int g Test Ġ: ĠBase Int g Test () Ġ{ ĊĊ ĉ override Ġlateinit Ġvar Ġgradle : ĠGradle Runner Rule ĊĊ ĉ @ Test Ġfun Ġ` skip s Ġdebug Wrapper Ġif Ġgradle w Ġdoes Ġnot Ġexist `() Ġ{ Ċĉ ĉ assume That ( gradle . root . resolve (" gradle w . bat "), Ġnot ( an Existing File ())) Ċĉ ĉ @ Language (" gradle ") Ċĉ ĉ val Ġscript Ġ= Ġ""" Ċĉĉ ĉ apply Ġplugin : Ġ' net . tw ister rob . root ' Ċĉ ĉ """. trim Indent () ĊĊĉ ĉ val Ġresult Ġ= Ġgradle . run ( script , Ġ" debug Wrapper "). build () ĊĊĉ ĉ result . assert Skipped (": debug Wrapper ") Ċ ĉ } ĊĊ ĉ @ Test Ġfun Ġ` gener ates Ġgrad led Ġif Ġgradle w Ġexists `() Ġ{ Ċĉ ĉ gradle . file ("", Ġ" gradle w . bat ") Ċĉ ĉ @ Language (" gradle ") Ċĉ ĉ val Ġscript Ġ= Ġ""" Ċĉĉ ĉ apply Ġplugin : Ġ' net . tw ister rob . root ' Ċĉ ĉ """. trim Indent () ĊĊĉ ĉ val Ġresult Ġ= Ġgradle . run ( script , Ġ" debug Wrapper "). build () ĊĊĉ ĉ result . assert Success (": debug Wrapper ") Ċĉ ĉ assertThat ( gradle . root . resolve (" grad led . bat "), Ġan Existing File ()) Ċ ĉ } ĊĊ ĉ @ Test Ġfun Ġ` debug Wrapper Ġis Ġincremental `() Ġ{ Ċĉ ĉ gradle . file ("", Ġ" gradle w . bat ") Ċĉ ĉ @ Language (" gradle ") Ċĉ ĉ val Ġscript Ġ= Ġ""" Ċĉĉ ĉ apply Ġplugin : Ġ' net . tw ister rob . root ' Ċĉ ĉ """. trim Indent () ĊĊĉ ĉ gradle . run ( script , Ġ" debug Wrapper "). build () Ċĉ ĉ assume That ( gradle . root . resolve (" grad led . bat "), Ġan Existing File ()) Ċĉ ĉ val Ġresult Ġ= Ġgradle . run ( null , Ġ" debug Wrapper "). build () ĊĊĉ ĉ result . assert Up ToDate (": debug Wrapper ") Ċ ĉ } Ċ } Ċ