Emacs Lisp is case sensitive: try the lowercase "eval":
((nil . ((eval . (setq compilation-directory "/home/vava/code_directory"))
(compilation-command . "rake"))))
Also, the file name for local directory variables is -.dir-locals.el, not .dir-local.el, as in the title of the question.
source
share