Use classDirectory setting in build script.
Use compileInputs settings in compile task.
Fix for classDirectory
Separate boot cp from normal cp.