Fill Stroke of an object with Gradient

Is there any way to fill Stroke with Gradient brush?
i’ve already tried it with graphicspath but it is likely that it doesnt accept color with alpha channel