mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support custom android_package_name in module codegen
Summary: ## Changes All `rn_library(codegen_modules = True)` must now also specify native_module_android_package_name, like so: ``` rn_library( name = "FBAuth" codegen_modules = True, native_module_spec_name = "Foo", native_module_android_package_name = "com.facebook.fbreact.specs", ) ``` This will generate the FBAuth Java spec files under the appropriate directory: "com/facebook/fbreact/specs". It will also make the code-generated specs have the appropriate package name: "com.facebook.fbreact.specs". Changelog: [Internal] Reviewed By: shergin Differential Revision: D25723176 fbshipit-source-id: 6efec1cbee43d70110c0ef23e2422e08609b61d4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6740b22ab0
commit
4c734d1e8d
+4
-3
@@ -371,11 +371,12 @@ module.exports = {
|
||||
packageName?: string,
|
||||
): FilesOutput {
|
||||
const files = new Map();
|
||||
const normalizedPackageName =
|
||||
packageName != null ? packageName : 'com.facebook.fbreact.specs';
|
||||
const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`;
|
||||
const nativeModules = getModules(schema);
|
||||
|
||||
const normalizedPackageName =
|
||||
packageName == null ? 'com.facebook.fbreact.specs' : packageName;
|
||||
const outputDir = `java/${normalizedPackageName.replace(/\./g, '/')}`;
|
||||
|
||||
Object.keys(nativeModules).forEach(hasteModuleName => {
|
||||
const {
|
||||
aliases,
|
||||
|
||||
Reference in New Issue
Block a user