Same method as for the SVG Icons, except for the CSS where you have to change a little thing. Follow the 3 first steps of this tutorial :
How to add a gradient to your icons
The only thing to change, is the custom CSS on Step 4 (you need to add 'path') :
Step 4
.shapediv-gradient svg path {
fill: url(#lgrad);
}
And then you apply the class to your shape divider element: