Generate code for dependent modules with plugin option and support only one file in dependencies

Change-Id: I8cd09669b517bdbf0b8dda2ba582b25b3a091bfc