checking GIT_DIR env variable and check .git in the root project
cleaning up gradle scripts and introducing own publishing part