IDEA-104500 Gradle: Allow to reuse common logic for other external systems

Make the project build on server
Test renamed to avoid confusion
IDEA-105455 (encode type information in type element copy)