@@ -55,8 +55,6 @@ class ReactNativeModules {
55
55
private ArrayList<HashMap<String , String > > reactNativeModules
56
56
57
57
private static String LOG_PREFIX = " :ReactNative:"
58
- private static String REACT_NATIVE_CONFIG_CMD = " yarn run --silent react-native config"
59
- private static String REACT_NATIVE_CONFIG_CMD_FALLBACK = " node ./node_modules/.bin/react-native config"
60
58
61
59
ReactNativeModules (Logger logger ) {
62
60
this . logger = logger
@@ -175,20 +173,14 @@ class ReactNativeModules {
175
173
176
174
def cmdProcess
177
175
def root = getReactNativeProjectRoot()
178
- def command = REACT_NATIVE_CONFIG_CMD_FALLBACK
176
+ def command = " node ./node_modules/.bin/react-native config "
179
177
180
178
try {
181
- try {
182
- // Check if project uses Yarn
183
- def isYarnProject = Runtime . getRuntime(). exec(" node -e console.log(require.resolve('./yarn.lock'))" , null , root)
184
- isYarnProject. waitFor()
185
- command = REACT_NATIVE_CONFIG_CMD
186
- } catch (Exception exception) {}
187
179
cmdProcess = Runtime . getRuntime(). exec(command, null , root)
188
180
cmdProcess. waitFor()
189
181
} catch (Exception exception) {
190
182
this . logger. warn(" ${ LOG_PREFIX}${ exception.message} " )
191
- this . logger. warn(" ${ LOG_PREFIX} Automatic import of native modules failed. (UNKNOWN) " )
183
+ this . logger. warn(" ${ LOG_PREFIX} Automatic import of native modules failed." )
192
184
return reactNativeModules
193
185
}
194
186
0 commit comments