diff --git a/packages/platform-android/native_modules.gradle b/packages/platform-android/native_modules.gradle index b1f30defd..3e925a62e 100644 --- a/packages/platform-android/native_modules.gradle +++ b/packages/platform-android/native_modules.gradle @@ -82,10 +82,10 @@ class ReactNativeModules { */ void addReactNativeModuleProjects() { reactNativeModules.forEach { reactNativeModule -> - String name = reactNativeModule["name"] + String nameCleansed = reactNativeModule["nameCleansed"] String androidSourceDir = reactNativeModule["androidSourceDir"] - defaultSettings.include(":${name}") - defaultSettings.project(":${name}").projectDir = new File("${androidSourceDir}") + defaultSettings.include(":${nameCleansed}") + defaultSettings.project(":${nameCleansed}").projectDir = new File("${androidSourceDir}") } } @@ -94,10 +94,10 @@ class ReactNativeModules { */ void addReactNativeModuleDependencies() { reactNativeModules.forEach { reactNativeModule -> - def name = reactNativeModule["name"] + def nameCleansed = reactNativeModule["nameCleansed"] project.dependencies { // TODO(salakar): are other dependency scope methods such as `api` required? - implementation project(path: ":${name}") + implementation project(path: ":${nameCleansed}") } } } @@ -196,6 +196,7 @@ class ReactNativeModules { HashMap reactNativeModuleConfig = new HashMap() reactNativeModuleConfig.put("name", name) + reactNativeModuleConfig.put("nameCleansed", name.replaceAll('/', '_')) reactNativeModuleConfig.put("androidSourceDir", androidConfig["sourceDir"]) reactNativeModuleConfig.put("packageInstance", androidConfig["packageInstance"]) reactNativeModuleConfig.put("packageImportPath", androidConfig["packageImportPath"])