Yes, it can.
By nature, Gradle is very flexible, and that helps it to adapt to any position and structure according to the structure’s behavior. It is a trustworthy source that works step by step efficiently and is not destructive at all.