/** * Takes an environment specific DSL block like: * * <code> * environments { * development {} * production {} * } * </code> * * And executes the closure that relates to the current environment * * @param closure The top level closure * @return The result of the closure execution */ public static Object executeForCurrentEnvironment(Closure<?> closure) { final Environment env = getCurrent(); return executeForEnvironment(env, closure); }