Created
April 12, 2022 20:56
-
-
Save hurali97/436813a0307ac1d1057ad4d52ace6e66 to your computer and use it in GitHub Desktop.
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
apply plugin: "com.android.application" | |
// Add the following | |
if (isNewArchitectureEnabled()) { | |
apply plugin: "com.facebook.react" | |
} | |
android { | |
// everything else | |
if (isNewArchitectureEnabled()) { | |
// everything else | |
// Add the following | |
packagingOptions { | |
pickFirst '**/libhermes.so' | |
pickFirst '**/libjsc.so' | |
} | |
} | |
} | |
// At the bottom | |
if (isNewArchitectureEnabled()) { | |
react { | |
libraryName = "CustomModules" // tells about the name for your library to use when generating artifacts for ini | |
codegenJavaPackageName = "com.rearchdemo.custommodules" // A string that represents the Java package your code should use | |
root = rootProject.file("..") // path of your root project | |
jsRootDir = rootProject.file("../src/custom-modules/specs/") // path to your Spec folder | |
reactNativeDir = rootProject.file("../node_modules/react-native/") // Reference to the react-native package root | |
codegenDir = rootProject.file("../node_modules/react-native-codegen/") // Reference to the react-native-codegen | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment