The build.gradle files within sub-projects apply checkstyle using the $rootDir variable trying to find the gradle directory which is in the path of the root project. However, the variable $rootDir is initialized to the path of the sub-project instead of the root project causing the server run to fail on incorrect path while trying to apply checkstyle.gradle file on the sub-projects.