/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 2 0 ĠThe ĠAndroid ĠOpen ĠSource ĠProject Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ package Ġcom . android . tools . idea . navigator . nodes . android Ċ Ċ import Ġcom . android . tools . idea . testing . Android Module Model Builder Ċ import Ġcom . android . tools . idea . testing . Android Project Builder Ċ import Ġcom . android . tools . idea . testing . Android Project Rule Ċ import Ġcom . android . tools . idea . testing . Java Module Model Builder . Companion . root Module Builder Ċ import Ġcom . android . tools . idea . testing . on Ed t Ċ import Ġcom . intellij . ide . project View . View Settings Ċ import Ġcom . intellij . test Framework . Runs In Ed t Ċ import Ġorg . junit . Assert . assertFalse Ċ import Ġorg . junit . Assert . assertTrue Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ Ċ @ Runs In Ed t Ċ class ĠAndroid Build Scripts Group Node Test Ġ{ ĊĠ Ġ@ get : Rule ĊĠ Ġval Ġproject Rule Ġ= ĠAndroid Project Rule . with Android Models (). on Ed t () ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġroot Project Only () Ġ{ ĊĠĠĠ Ġval Ġsetting _ gradle Ġ= Ġproject Rule . fixture . add File To Project (" settings . gradle ", Ġ"") ĊĠĠĠ Ġval Ġbuild _ gradle Ġ= Ġproject Rule . fixture . add File To Project (" build . gradle ", Ġ"") ĊĠĠĠ Ġval Ġapp _ build _ gradle Ġ= Ġproject Rule . fixture . add File To Project (" app / build . gradle ", Ġ"") ĊĠĠĠ Ġval Ġgradle _ wrapper _ gradle _ wrapper _ properties Ġ= Ġproject Rule . fixture . add File To Project (" gradle / wrapper / gradle - wrapper . properties ", Ġ"") ĊĠĠĠ Ġval Ġgradle _ properties Ġ= Ġproject Rule . fixture . add File To Project (" gradle . properties ", Ġ"") ĊĠĠĠ Ġval Ġlocal _ properties Ġ= Ġproject Rule . fixture . add File To Project (" local . properties ", Ġ"") ĊĠĠĠ Ġval Ġunrelated _ txt Ġ= Ġproject Rule . fixture . add File To Project (" un related . txt ", Ġ"") ĊĠĠĠ Ġproject Rule . setup Project From ( root Module Builder ) ĊĊĠĠĠ Ġval Ġnode Ġ= ĠAndroid Build Scripts Group Node ( project Rule . project , ĠView Settings . DEFAULT ) ĊĊĠĠĠ ĠassertTrue ( node . contains ( setting _ gradle . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( build _ gradle . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( gradle _ wrapper _ gradle _ wrapper _ properties . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( gradle _ properties . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( local _ properties . virtual File )) ĊĠĠĠ ĠassertFalse ( node . contains ( app _ build _ gradle . virtual File )) Ġ Ġ// ĠWe Ġdo Ġnot Ġshow Ġbuild Ġfiles Ġfrom Ġmodules Ġnot Ġrecogn ised Ġby Ġsync . ĊĠĠĠ ĠassertFalse ( node . contains ( un related _ txt . virtual File )) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġapp Project () Ġ{ ĊĠĠĠ Ġval Ġsetting _ gradle Ġ= Ġproject Rule . fixture . add File To Project (" settings . gradle ", Ġ"") ĊĠĠĠ Ġval Ġbuild _ gradle Ġ= Ġproject Rule . fixture . add File To Project (" build . gradle ", Ġ"") ĊĠĠĠ Ġval Ġapp _ build _ gradle Ġ= Ġproject Rule . fixture . add File To Project (" app / build . gradle ", Ġ"") ĊĠĠĠ Ġval Ġapp _ pro guard _ rules _ pro Ġ= Ġproject Rule . fixture . add File To Project (" app / pro guard - rules . pro ", Ġ"") ĊĠĠĠ Ġval Ġapp _ consumer _ pro guard _ rules _ pro Ġ= Ġproject Rule . fixture . add File To Project (" app / consumer - pro guard - rules . pro ", Ġ"") ĊĠĠĠ Ġval Ġunrelated _ txt Ġ= Ġproject Rule . fixture . add File To Project (" un related . txt ", Ġ"") ĊĠĠĠ Ġval Ġapp _ un related _ txt Ġ= Ġproject Rule . fixture . add File To Project (" app / un related . txt ", Ġ"") ĊĠĠĠ Ġproject Rule . setup Project From ( root Module Builder , Ġ ĠAndroid Module Model Builder (": app ", Ġ" debug ", ĠAndroid Project Builder ())) ĊĊĠĠĠ Ġval Ġnode Ġ= ĠAndroid Build Scripts Group Node ( project Rule . project , ĠView Settings . DEFAULT ) ĊĊĠĠĠ ĠassertTrue ( node . contains ( setting _ gradle . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( build _ gradle . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( app _ pro guard _ rules _ pro . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( app _ consumer _ pro guard _ rules _ pro . virtual File )) ĊĠĠĠ ĠassertTrue ( node . contains ( app _ build _ gradle . virtual File )) ĊĠĠĠ ĠassertFalse ( node . contains ( un related _ txt . virtual File )) ĊĠĠĠ ĠassertFalse ( node . contains ( app _ un related _ txt . virtual File )) ĊĠ Ġ} Ċ }