How to initialize git submodule BEFORE build

I did that, unfortunately, snapcraft still fails when building this package. failing build

I tried to put all submodules in a repository i.o. to localize the problem and it builds now
success build

Though it should possible as @Saviq said.