for migration to Gradle 7+ #KTI-559
- split into script def and host part - remove bad dependencies - organize it in a way that should be typical for user scenarios