[build][Refacto] Refactoring of Gradle build