Gradle script modified for detecting code directories