Failed file name validation when building the library project


I have a library project with .spr images in drawable folder. when i make the flavor build it fails giving “Failed file name validation” but this was working earlier in gradle 3.3 with the attribute ****“android.dissableResourcevalidation=true”.
but this doesn’t work now, could you please provide me the alternate.

Note: i want the same spr images. i dont have option change the extension.