code: public static boolean isProjectSource(Resource r) {
          try {
              String file = r.getURL().getFile();
              return isProjectSource(file) || file.endsWith("GrailsPlugin.groovy");
          }
          catch (IOException e) {
              return false;
          }
      }
docs: Checks whether the specified path is a Grails path.
  
  @param r The resoruce to check
  @return true if it is a Grails path