/* Ċ Ġ* Ġ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 . build . at tribution . ui . model Ċ Ċ import Ġcom . android . build . at tribution . ui . data . Plugin Source Type . ANDROID _ PLUGIN Ċ import Ġcom . android . build . at tribution . ui . data . Plugin Source Type . BUILD _ SRC Ċ import Ġcom . android . build . at tribution . ui . data . Plugin Source Type . TH IRD _ PAR TY Ċ import Ġcom . android . build . at tribution . ui . data . Task Issue Type Ċ import Ġcom . google . common . truth . Expect Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ Ċ class ĠBuild Analyzer Filters Ui Test Ġ{ ĊĊĠ Ġ@ get : Rule ĊĠ Ġval Ġexpect Ġ= ĠExpect . create And Enable StackTrace () !! ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Warnings Filter Ui Short Summary () Ġ{ ĊĠĠĠ Ġfun Ġverify Filter ( filter : ĠWarning s Filter , Ġexpected Text : ĠString ) Ġ{ ĊĠĠĠĠĠ Ġexpect . that ( filter . to Ui Text ()). isEqualTo ( expected Text ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġempty Set (), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġempty Set (), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Nothing Ġselected ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġempty Set (), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Nothing Ġselected ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġempty Set (), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġtrue , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Annotation Ġprocessors ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġempty Set (), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Nothing Ġselected ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġempty Set (), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġtrue , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Annotation Ġprocessors ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S , ĠTask Issue Type . TASK _ SETUP _ ISSUE ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . TASK _ SETUP _ ISSUE ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . TASK _ SETUP _ ISSUE ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY , ĠBUILD _ SRC ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY , ĠBUILD _ SRC ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . TASK _ SETUP _ ISSUE ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY , ĠBUILD _ SRC ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . TASK _ SETUP _ ISSUE ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġtrue , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġtrue ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" Selected Ġtypes Ġof Ġtask Ġwarnings , ĠAnnotation Ġprocessors , ĠConfiguration Ġcache ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY , ĠBUILD _ SRC ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S , ĠTask Issue Type . TASK _ SETUP _ ISSUE ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġfalse ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" All Ġtask Ġwarnings ") ĊĠĠĠ Ġverify Filter ( ĊĠĠĠĠĠ Ġfilter Ġ= ĠWarning s Filter ( ĊĠĠĠĠĠĠĠ Ġshow Task Source Types Ġ= Ġset Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY , ĠBUILD _ SRC ), ĊĠĠĠĠĠĠĠ Ġshow Task Warning Types Ġ= Ġset Of ( Task Issue Type . ALWAYS _ RUN _ TASK S , ĠTask Issue Type . TASK _ SETUP _ ISSUE ), ĊĠĠĠĠĠĠĠ Ġshow Annotation Processor Warnings Ġ= Ġtrue , ĊĠĠĠĠĠĠĠ Ġshow Non Critical Path Tasks Ġ= Ġfalse , ĊĠĠĠĠĠĠĠ Ġshow Configuration Cache Warnings Ġ= Ġtrue ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġexpected Text Ġ= Ġ" All Ġtask Ġwarnings , ĠAnnotation Ġprocessors , ĠConfiguration Ġcache " ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġtest Tasks Filter Ui Short Summary () Ġ{ ĊĠĠĠ Ġexpect . that ( Tasks Filter ( empty Set (), Ġshow Tasks Without Warnings Ġ= Ġfalse ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" No Ġtask Ġtypes Ġselected ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( empty Set (), Ġshow Tasks Without Warnings Ġ= Ġtrue ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" No Ġtask Ġtypes Ġselected ") ĊĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( ANDROID _ PLUGIN ), Ġshow Tasks Without Warnings Ġ= Ġtrue ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Android / Java / Kotlin Ġtasks ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( BUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġtrue ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Project Ġcustomization Ġtasks ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( TH IRD _ PAR TY ), Ġshow Tasks Without Warnings Ġ= Ġtrue ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Other Ġtasks ") ĊĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( ANDROID _ PLUGIN ), Ġshow Tasks Without Warnings Ġ= Ġfalse ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Android / Java / Kotlin Ġtasks Ġwith Ġwarnings ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( BUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġfalse ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Project Ġcustomization Ġtasks Ġwith Ġwarnings ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( TH IRD _ PAR TY ), Ġshow Tasks Without Warnings Ġ= Ġfalse ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Other Ġtasks Ġwith Ġwarnings ") ĊĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( ANDROID _ PLUGIN , ĠBUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġtrue ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Android / Java / Kotlin , ĠProject Ġcustomization Ġtasks ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( TH IRD _ PAR TY , ĠBUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġtrue ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Project Ġcustomization , ĠOther Ġtasks ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY , ĠBUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġtrue ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" All Ġtasks ") ĊĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( ANDROID _ PLUGIN , ĠBUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġfalse ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Android / Java / Kotlin , ĠProject Ġcustomization Ġtasks Ġwith Ġwarnings ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( TH IRD _ PAR TY , ĠBUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġfalse ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" Project Ġcustomization , ĠOther Ġtasks Ġwith Ġwarnings ") ĊĠĠĠ Ġexpect . that ( Tasks Filter ( set Of ( ANDROID _ PLUGIN , ĠTH IRD _ PAR TY , ĠBUILD _ SRC ), Ġshow Tasks Without Warnings Ġ= Ġfalse ). to Ui Text ()) ĊĠĠĠĠĠ Ġ. isEqualTo (" All Ġtasks Ġwith Ġwarnings ") ĊĠ Ġ} Ċ }