Codegen: separate Android/Cxx/iOS modules codegen outputs

Summary:
For now, separate the definition of `modules` generator per platform to avoid file output collision. Additionally:
* For Android, produce files under java/ (plus nested subdirs based on packageName) and jni/ (for C++ files) - JavaPoet version already does it
* Allow configuring packageName for Android - JavaPoet version has this
* Avoid tmp directory dance in the CLI script, given the proper modules separation

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24410864

fbshipit-source-id: 9bd6bc1d65bec037bfca32ec478f3af50d72e927
This commit is contained in:
Kevin Gozali
2020-10-20 14:09:09 -07:00
committed by Facebook GitHub Bot
parent d03c0f965e
commit 13d9927a48
23 changed files with 109 additions and 114 deletions
@@ -209,6 +209,7 @@ module.exports = {
libraryName: string,
schema: SchemaType,
moduleSpecName: string,
packageName?: string,
): FilesOutput {
const files = new Map();
Object.keys(schema.modules).forEach(moduleName => {