fixed gradle build to use project dependencies optionally