Add gradient code to build system.