-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
react-native link support for native Android modules developed in Kotlin
Summary: Currently React Native cli does not support linking native Android modules written in Kotlin. This PR aims to add support to it and closes #14561 - New unit tests added to verify the added functionality, they can be found inside: `local-cli/core/__tests__/android/findPackageClassName.spec.js` - Existing unit tests passed. Closes #14660 Differential Revision: D5316981 Pulled By: shergin fbshipit-source-id: 98354ba1e1ce1080a9a4b9958ef39893472038a1
- Loading branch information
1 parent
0797dae
commit d666f30
Showing
5 changed files
with
54 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.some.example; | ||
|
||
import android.view.View | ||
import com.facebook.react.ReactPackage | ||
import com.facebook.react.bridge.NativeModule | ||
import com.facebook.react.bridge.ReactApplicationContext | ||
import com.facebook.react.uimanager.ReactShadowNode | ||
import com.facebook.react.uimanager.ViewManager | ||
import java.util.* | ||
|
||
class SomeExampleKotlinPackage : ReactPackage { | ||
|
||
override fun createNativeModules(reactContext: ReactApplicationContext): MutableList<NativeModule> | ||
= mutableListOf(MaterialPaletteModule(reactContext)) | ||
|
||
override fun createViewManagers(reactContext: ReactApplicationContext?): | ||
MutableList<ViewManager<View, ReactShadowNode>> = Collections.emptyList() | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters