/** * Takes an environment specific DSL block like: * * <code> * environments { * development {} * production {} * } * </code> * * And returns the closure that relates to the current environment * * @param closure The top level closure * @return The environment specific block or null if non exists */ public static Closure<?> getEnvironmentSpecificBlock(Closure<?> closure) { final Environment env = getCurrent(); return getEnvironmentSpecificBlock(env, closure); }