Remove RCT prefix from names of generated Java classes

Summary: This diff removes the 'RCT' prefix (if it's present) from the names of the generated Java classes. The motivation is that we don't want to have any Java files having this prefix in the RN Android codebase.

Reviewed By: JoshuaGross

Differential Revision: D17123804

fbshipit-source-id: 31905d3141e0f58ea47cdbdb0cf77d2d105de9a9
This commit is contained in:
Oleksandr Melnykov
2019-08-30 10:01:31 -07:00
committed by Facebook Github Bot
parent 38089753ef
commit 26a8d2e03a
13 changed files with 39 additions and 20 deletions
@@ -16,7 +16,11 @@ import type {
PropTypeShape,
SchemaType,
} from '../../CodegenSchema';
const {getImports, toSafeJavaString} = require('./JavaHelpers');
const {
getImports,
toSafeJavaString,
getInterfaceJavaClassName,
} = require('./JavaHelpers');
// File path -> contents
type FilesOutput = Map<string, string>;
@@ -190,7 +194,7 @@ module.exports = {
return Object.keys(components).forEach(componentName => {
const component = components[componentName];
const className = `${componentName}ManagerInterface`;
const className = getInterfaceJavaClassName(componentName);
const fileName = `${className}.java`;
const imports = getImports(component);