diff --git a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt index 2608e77f43fc..812d099d2202 100644 --- a/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt +++ b/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt @@ -88,6 +88,8 @@ internal object AgpConfiguratorUtils { } fun configureDevServerLocation(project: Project) { + val devServerIp = + project.properties["reactNativeDevServerIp"]?.toString() ?: getHostIpAddress() val devServerPort = project.properties["reactNativeDevServerPort"]?.toString() ?: DEFAULT_DEV_SERVER_PORT @@ -100,7 +102,7 @@ internal object AgpConfiguratorUtils { ext.defaultConfig.resValue( "string", "react_native_dev_server_ip", - getHostIpAddress(), + devServerIp, ) ext.defaultConfig.resValue("integer", "react_native_dev_server_port", devServerPort) }