/* Ċ Ġ* Ġ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 . api . variant . impl Ċ Ċ import Ġcom . android . build . api . dsl . Pack aging Options Ċ import Ġcom . android . build . gradle . internal . dsl . decorator . android Plugin Dsl Decorator Ċ import Ġcom . android . build . gradle . internal . services . Dsl Services Ċ import Ġcom . android . build . gradle . internal . services . create Dsl Services Ċ import Ġcom . android . build . gradle . internal . services . create Project Services Ċ import Ġcom . android . build . gradle . internal . services . create Variant Properties Api Services Ċ import Ġcom . google . common . collect . Sets Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ Ċ class ĠJ ni Lib s Pack aging Impl Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġd sl Pack aging Options : ĠPack aging Options ĊĠĠĠ Ġprivate Ġval Ġproject Services Ġ= Ġcreate Project Services () ĊĠĠĠ Ġprivate Ġval Ġd sl Services : ĠD sl Services Ġ= Ġcreate Dsl Services ( project Services ) ĊĠĠĠ Ġprivate Ġval Ġvariant Properties Api Services Ġ= Ġcreate Variant Properties Api Services ( project Services ) ĊĊĠĠĠ Ġinterface ĠPack aging Options Wrapper Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpackaging Options : ĠPack aging Options ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġd sl Pack aging Options Ġ= Ġandroid Plugin Dsl Decorator . decorate ( Pack aging Options Wrapper :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. getDeclared Constructor ( Dsl Services :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. newInstance ( dsl Services ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. packaging Options ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Exclude s () Ġ{ ĊĠĠĠĠĠĠĠ Ġd sl Pack aging Options . exclude s . add (" foo ") ĊĠĠĠĠĠĠĠ Ġd sl Pack aging Options . jni Lib s . exclude s . add (" bar ") ĊĠĠĠĠĠĠĠ Ġ// Ġtest Ġset Exclude s Ġmethod Ġtoo ĊĠĠĠĠĠĠĠ Ġval Ġd sl J ni Lib s Pack aging Options Impl Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġd sl Pack aging Options . jni Lib s ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġas Ġcom . android . build . gradle . internal . dsl . J ni Lib s Pack aging Options Impl ĊĠĠĠĠĠĠĠ Ġd sl J ni Lib s Pack aging Options Impl . set Exclude s ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSets . union ( dsl Pack aging Options . jni Lib s . exclude s , Ġset Of (" baz ")) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġj ni Lib s Pack aging Options Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠJ ni Lib s Pack aging Impl ( dsl Pack aging Options , Ġvariant Properties Api Services ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( jni Lib s Pack aging Options . exclude s . get ()). contains Exactly (" foo ", Ġ" bar ", Ġ" baz ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Pick First s () Ġ{ ĊĠĠĠĠĠĠĠ Ġd sl Pack aging Options . pick First s . add (" foo ") ĊĠĠĠĠĠĠĠ Ġd sl Pack aging Options . jni Lib s . pick First s . add (" bar ") ĊĠĠĠĠĠĠĠ Ġ// Ġtest Ġset Pick First s Ġmethod Ġtoo ĊĠĠĠĠĠĠĠ Ġval Ġd sl J ni Lib s Pack aging Options Impl Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġd sl Pack aging Options . jni Lib s ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġas Ġcom . android . build . gradle . internal . dsl . J ni Lib s Pack aging Options Impl ĊĠĠĠĠĠĠĠ Ġd sl J ni Lib s Pack aging Options Impl . set Pick First s ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSets . union ( dsl Pack aging Options . jni Lib s . pick First s , Ġset Of (" baz ")) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġj ni Lib s Pack aging Options Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠJ ni Lib s Pack aging Impl ( dsl Pack aging Options , Ġvariant Properties Api Services ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( jni Lib s Pack aging Options . pick First s . get ()). contains Exactly (" foo ", Ġ" bar ", Ġ" baz ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Keep Debug Symbols () Ġ{ ĊĠĠĠĠĠĠĠ Ġd sl Pack aging Options . do Not Strip . add (" foo ") ĊĠĠĠĠĠĠĠ Ġd sl Pack aging Options . jni Lib s . keep Debug Symbols . add (" bar ") ĊĠĠĠĠĠĠĠ Ġ// Ġtest Ġset Keep Debug Symbols Ġmethod Ġtoo ĊĠĠĠĠĠĠĠ Ġval Ġd sl J ni Lib s Pack aging Options Impl Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġd sl Pack aging Options . jni Lib s ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġas Ġcom . android . build . gradle . internal . dsl . J ni Lib s Pack aging Options Impl ĊĠĠĠĠĠĠĠ Ġd sl J ni Lib s Pack aging Options Impl . set Keep Debug Symbols ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSets . union ( dsl Pack aging Options . jni Lib s . keep Debug Symbols , Ġset Of (" baz ")) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġj ni Lib s Pack aging Options Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠJ ni Lib s Pack aging Impl ( dsl Pack aging Options , Ġvariant Properties Api Services ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( jni Lib s Pack aging Options . keep Debug Symbols . get ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. contains Exactly (" foo ", Ġ" bar ", Ġ" baz ") ĊĠĠĠ Ġ} Ċ } Ċ