Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/platform-android/native_modules.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
}

Expand All @@ -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}")
}
}
}
Expand Down Expand Up @@ -196,6 +196,7 @@ class ReactNativeModules {

HashMap reactNativeModuleConfig = new HashMap<String, String>()
reactNativeModuleConfig.put("name", name)
reactNativeModuleConfig.put("nameCleansed", name.replaceAll('/', '_'))
reactNativeModuleConfig.put("androidSourceDir", androidConfig["sourceDir"])
reactNativeModuleConfig.put("packageInstance", androidConfig["packageInstance"])
reactNativeModuleConfig.put("packageImportPath", androidConfig["packageImportPath"])
Expand Down