package io.trygvis.rules.engine; import java.util.Map import org.apache.commons.io.FileSystem import org.apache.commons.io.FileUtils import java.io.File rule "Clean directories" agenda-group "init" when not(KeyValue(key == "rm-gen")); then System.out.println("Cleaning gen!"); FileUtils.deleteDirectory(new File("gen")); insert(new KeyValue("rm-gen", null)); end