Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] remove forward slashes from package name #340

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