/* Ċ Ġ* Ġ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 . component . analytics Ċ Ċ import Ġcom . android . build . api . artifact . Artifact Ċ import Ġcom . android . build . api . artifact . Artifact Transformation Request Ċ import Ġcom . android . build . api . artifact . In And Out Directory Operation Request Ċ import Ġcom . android . build . gradle . internal . profile . Analytics Util Ċ import Ġcom . android . tools . build . gradle . internal . profile . Variant Properties MethodType Ċ import Ġcom . google . wire less . android . sdk . stats . Artifact Access Ċ import Ġcom . google . wire less . android . sdk . stats . Gradle Build Variant Ċ import Ġorg . gradle . api . Task Ċ import Ġorg . gradle . api . file . Directory Ċ import Ġjavax . inject . Inject Ċ Ċ open Ġclass ĠAnalytics Enabled In And Out Directory Operation Request < Task T : ĠTask > Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġval Ġdelegate : ĠIn And Out Directory Operation Request < Task T >, ĊĠĠĠ Ġval Ġstats : ĠGradle Build Variant . Builder Ċ ): ĠIn And Out Directory Operation Request < Task T > Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġ< Artifact Type T > Ġto Transform ( type : ĠArtifact Type T ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwhere ĠArtifact Type T Ġ: ĠArtifact . Single < Directory >, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠArtifact Type T Ġ: ĠArtifact . Transform able Ġ{ ĊĠĠĠĠĠĠĠ Ġstats . variant Api Access Builder . add Variant Properties Access Builder (). type Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠVariant Properties MethodType . TO _ TRANSFORM _ DIRECTORY _ VALUE ĊĠĠĠĠĠĠĠ Ġstats . variant Api Access Builder . add Artifact Access Builder (). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . input Artifact Type Ġ= ĠAnalytics Util . get Variant Api Artifact Type ( type . java Class ). number ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . type Ġ= ĠArtifact Access . AccessType . TRANSFORM ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġdelegate . to Transform ( type ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġ< Artifact Type T > Ġto Transform Many ( type : ĠArtifact Type T ): ĠArtifact Transformation Request < Task T > ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwhere ĠArtifact Type T Ġ: ĠArtifact . Single < Directory >, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠArtifact Type T Ġ: ĠArtifact . Contains Many Ġ{ ĊĠĠĠĠĠĠĠ Ġstats . variant Api Access Builder . add Variant Properties Access Builder (). type Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠVariant Properties MethodType . TO _ TRANSFORM _ MAN Y _ VALUE ĊĠĠĠĠĠĠĠ Ġstats . variant Api Access Builder . add Artifact Access Builder (). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . input Artifact Type Ġ= ĠAnalytics Util . get Variant Api Artifact Type ( type . java Class ). number ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . type Ġ= ĠArtifact Access . AccessType . TRANSFORM _ MAN Y ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġdelegate . to Transform Many ( type ) ĊĠĠĠ Ġ} Ċ } Ċ