feat(expo): upgrade Expo to v52 (#29142)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # Co-authored-by: Hassan Khan <h@twodoors.dev>
This commit is contained in:
parent
cfcd4d1440
commit
a0f4260ebd
@ -35,6 +35,19 @@
|
|||||||
"alwaysAddToPackageJson": false
|
"alwaysAddToPackageJson": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"20.3.0": {
|
||||||
|
"version": "20.3.0-beta.0",
|
||||||
|
"packages": {
|
||||||
|
"detox": {
|
||||||
|
"version": "~20.28.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@testing-library/jest-dom": {
|
||||||
|
"version": "~6.6.3",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
export const nxVersion = require('../../package.json').version;
|
export const nxVersion = require('../../package.json').version;
|
||||||
|
|
||||||
export const detoxVersion = '~20.18.1';
|
export const detoxVersion = '~20.28.0';
|
||||||
export const testingLibraryJestDom = '~6.4.2';
|
export const testingLibraryJestDom = '~6.6.3';
|
||||||
export const configPluginsDetoxVersion = '~8.0.0'; // only required for expo
|
export const configPluginsDetoxVersion = '~8.0.0'; // only required for expo
|
||||||
|
|||||||
@ -247,6 +247,83 @@
|
|||||||
"alwaysAddToPackageJson": false
|
"alwaysAddToPackageJson": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"20.3.0": {
|
||||||
|
"version": "20.3.0-beta.0",
|
||||||
|
"packages": {
|
||||||
|
"expo": {
|
||||||
|
"version": "~52.0.11",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"expo-splash-screen": {
|
||||||
|
"version": "~0.29.13",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"expo-status-bar": {
|
||||||
|
"version": "~2.0.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@expo/cli": {
|
||||||
|
"version": "~0.21.8",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"babel-preset-expo": {
|
||||||
|
"version": "~12.0.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react": {
|
||||||
|
"version": "~18.3.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-dom": {
|
||||||
|
"version": "~18.3.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-test-renderer": {
|
||||||
|
"version": "~18.3.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@types/react": {
|
||||||
|
"version": "~18.3.12",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native": {
|
||||||
|
"version": "~0.76.3",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native-web": {
|
||||||
|
"version": "~0.19.13",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@expo/metro-config": {
|
||||||
|
"version": "~0.19.4",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@expo/metro-runtime": {
|
||||||
|
"version": "~4.0.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native-svg-transformer": {
|
||||||
|
"version": "~1.5.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native-svg": {
|
||||||
|
"version": "~15.8.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@testing-library/react-native": {
|
||||||
|
"version": "~12.9.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"jest-expo": {
|
||||||
|
"version": "~52.0.2",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@babel/runtime": {
|
||||||
|
"version": "7.26.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,10 +44,10 @@ export async function installAndUpdatePackageJson(
|
|||||||
|
|
||||||
await installAsync(
|
await installAsync(
|
||||||
packages,
|
packages,
|
||||||
createInstallOptions({
|
{
|
||||||
fix: options.fix,
|
fix: options.fix,
|
||||||
check: options.check,
|
check: options.check,
|
||||||
}),
|
},
|
||||||
createInstallOptions({ force: options.force })
|
createInstallOptions({ force: options.force })
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,27 +1,27 @@
|
|||||||
export const nxVersion = require('../../package.json').version;
|
export const nxVersion = require('../../package.json').version;
|
||||||
|
|
||||||
export const expoVersion = '~51.0.8';
|
export const expoVersion = '~52.0.11';
|
||||||
export const expoSplashScreenVersion = '~0.27.4';
|
export const expoSplashScreenVersion = '~0.29.13';
|
||||||
export const expoStatusBarVersion = '~1.12.1';
|
export const expoStatusBarVersion = '~2.0.0';
|
||||||
export const expoCliVersion = '~0.18.13'; // @expo/cli
|
export const expoCliVersion = '~0.21.8'; // @expo/cli
|
||||||
export const babelPresetExpoVersion = '~11.0.0';
|
export const babelPresetExpoVersion = '~12.0.1';
|
||||||
|
|
||||||
export const reactVersion = '18.2.0';
|
export const reactVersion = '~18.3.1';
|
||||||
export const reactDomVersion = '18.2.0';
|
export const reactDomVersion = '~18.3.1';
|
||||||
export const reactTestRendererVersion = '18.2.0';
|
export const reactTestRendererVersion = '~18.3.1';
|
||||||
export const typesReactVersion = '~18.2.45';
|
export const typesReactVersion = '~18.3.12';
|
||||||
|
|
||||||
export const reactNativeVersion = '0.74.1';
|
export const reactNativeVersion = '0.76.3';
|
||||||
export const reactNativeWebVersion = '~0.19.11';
|
export const reactNativeWebVersion = '~0.19.13';
|
||||||
|
|
||||||
export const expoMetroConfigVersion = '~0.18.1';
|
export const expoMetroConfigVersion = '~0.19.4';
|
||||||
export const expoMetroRuntimeVersion = '~3.2.1';
|
export const expoMetroRuntimeVersion = '~4.0.0';
|
||||||
|
|
||||||
export const reactNativeSvgTransformerVersion = '1.3.0';
|
export const reactNativeSvgTransformerVersion = '~1.5.0';
|
||||||
export const reactNativeSvgVersion = '15.2.0';
|
export const reactNativeSvgVersion = '~15.8.0';
|
||||||
|
|
||||||
export const testingLibraryReactNativeVersion = '~12.5.0';
|
export const testingLibraryReactNativeVersion = '~12.9.0';
|
||||||
export const testingLibraryJestNativeVersion = '~5.4.3';
|
export const testingLibraryJestNativeVersion = '~5.4.3';
|
||||||
export const jestExpoVersion = '~51.0.2';
|
export const jestExpoVersion = '~52.0.2';
|
||||||
|
|
||||||
export const babelRuntimeVersion = '7.24.5';
|
export const babelRuntimeVersion = '~7.26.0';
|
||||||
|
|||||||
@ -220,6 +220,79 @@
|
|||||||
"alwaysAddToPackageJson": false
|
"alwaysAddToPackageJson": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"20.3.0": {
|
||||||
|
"version": "20.3.0-beta.0",
|
||||||
|
"packages": {
|
||||||
|
"react-native": {
|
||||||
|
"version": "~0.76.3",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@react-native-community/cli": {
|
||||||
|
"version": "~15.0.1",
|
||||||
|
"alwaysAddToPackageJson": true
|
||||||
|
},
|
||||||
|
"@react-native-community/cli-platform-android": {
|
||||||
|
"version": "~15.0.1",
|
||||||
|
"alwaysAddToPackageJson": true
|
||||||
|
},
|
||||||
|
"@react-native-community/cli-platform-ios": {
|
||||||
|
"version": "~15.0.1",
|
||||||
|
"alwaysAddToPackageJson": true
|
||||||
|
},
|
||||||
|
"@react-native/babel-preset": {
|
||||||
|
"version": "~0.76.3",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@react-native/metro-config": {
|
||||||
|
"version": "~0.76.3",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native-web": {
|
||||||
|
"version": "~0.19.13",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react": {
|
||||||
|
"version": "~18.3.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-dom": {
|
||||||
|
"version": "~18.3.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-test-renderer": {
|
||||||
|
"version": "~18.3.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@types/react": {
|
||||||
|
"version": "~18.3.12",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@types/react-dom": {
|
||||||
|
"version": "~18.3.1",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"@testing-library/react-native": {
|
||||||
|
"version": "~12.9.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native-svg-transformer": {
|
||||||
|
"version": "~1.5.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native-svg": {
|
||||||
|
"version": "~15.8.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
},
|
||||||
|
"react-native-svg-web": {
|
||||||
|
"version": "~1.0.9",
|
||||||
|
"addToPackageJson": "devDependencies"
|
||||||
|
},
|
||||||
|
"@babel/runtime": {
|
||||||
|
"version": "~7.26.0",
|
||||||
|
"alwaysAddToPackageJson": false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ source 'https://rubygems.org'
|
|||||||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
||||||
ruby ">= 2.6.10"
|
ruby ">= 2.6.10"
|
||||||
|
|
||||||
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
|
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
||||||
# bound in the template on Cocoapods with next React Native release.
|
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
||||||
gem 'cocoapods', '>= 1.13', '< 1.15'
|
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
||||||
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
|
gem 'xcodeproj', '< 1.26.0'
|
||||||
|
|||||||
@ -8,13 +8,13 @@ apply plugin: "com.facebook.react"
|
|||||||
*/
|
*/
|
||||||
react {
|
react {
|
||||||
/* Folders */
|
/* Folders */
|
||||||
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
// The root of your project, i.e. where "package.json" lives. Default is '../..'
|
||||||
// root = file("../")
|
// root = file("../../")
|
||||||
// The folder where the react-native NPM package is. Default is <%= offsetFromRoot %>../../node_modules/react-native
|
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
|
||||||
reactNativeDir = file("<%= offsetFromRoot %>../../node_modules/react-native")
|
reactNativeDir = file("<%= offsetFromRoot %>../../node_modules/react-native")
|
||||||
// The folder where the react-native Codegen package is. Default is <%= offsetFromRoot %>../../node_modules/@react-native/codegen
|
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
|
||||||
codegenDir = file("<%= offsetFromRoot %>../../node_modules/@react-native/codegen")
|
codegenDir = file("<%= offsetFromRoot %>../../node_modules/@react-native/codegen")
|
||||||
// The cli.js file which is the React Native CLI entrypoint. Default is <%= offsetFromRoot %>../../node_modules/react-native/cli.js
|
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
|
||||||
cliFile = file("<%= offsetFromRoot %>../../node_modules/react-native/cli.js")
|
cliFile = file("<%= offsetFromRoot %>../../node_modules/react-native/cli.js")
|
||||||
|
|
||||||
/* Variants */
|
/* Variants */
|
||||||
@ -45,10 +45,13 @@ react {
|
|||||||
|
|
||||||
/* Hermes Commands */
|
/* Hermes Commands */
|
||||||
// The hermes compiler command to run. By default it is 'hermesc'
|
// The hermes compiler command to run. By default it is 'hermesc'
|
||||||
hermesCommand = "<%= offsetFromRoot %>node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc"
|
hermesCommand = "<%= offsetFromRoot %>../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc"
|
||||||
//
|
//
|
||||||
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
||||||
// hermesFlags = ["-O", "-output-source-map"]
|
// hermesFlags = ["-O", "-output-source-map"]
|
||||||
|
|
||||||
|
/* Autolinking */
|
||||||
|
autolinkLibrariesWithApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,5 +117,3 @@ dependencies {
|
|||||||
implementation jscFlavor
|
implementation jscFlavor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: file("<%= offsetFromRoot %>../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
|
android:supportsRtl="true"
|
||||||
android:networkSecurityConfig="@xml/network_security_config">
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
|
|||||||
@ -9,17 +9,18 @@ import com.facebook.react.ReactPackage
|
|||||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
||||||
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
||||||
import com.facebook.react.defaults.DefaultReactNativeHost
|
import com.facebook.react.defaults.DefaultReactNativeHost
|
||||||
|
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
||||||
import com.facebook.soloader.SoLoader
|
import com.facebook.soloader.SoLoader
|
||||||
|
|
||||||
class MainApplication : Application(), ReactApplication {
|
class MainApplication : Application(), ReactApplication {
|
||||||
|
|
||||||
override val reactNativeHost: ReactNativeHost =
|
override val reactNativeHost: ReactNativeHost =
|
||||||
object : DefaultReactNativeHost(this) {
|
object : DefaultReactNativeHost(this) {
|
||||||
override fun getPackages(): List<ReactPackage> {
|
override fun getPackages(): List<ReactPackage> =
|
||||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
PackageList(this).packages.apply {
|
||||||
// packages.add(new MyReactNativePackage());
|
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||||
return PackageList(this).packages
|
// add(MyReactNativePackage())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getJSMainModuleName(): String = "src/main"
|
override fun getJSMainModuleName(): String = "src/main"
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ class MainApplication : Application(), ReactApplication {
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
SoLoader.init(this, false)
|
SoLoader.init(this, OpenSourceMergedSoMapping)
|
||||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
||||||
load()
|
load()
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "34.0.0"
|
buildToolsVersion = "35.0.0"
|
||||||
minSdkVersion = 23
|
minSdkVersion = 24
|
||||||
compileSdkVersion = 34
|
compileSdkVersion = 35
|
||||||
targetSdkVersion = 34
|
targetSdkVersion = 34
|
||||||
ndkVersion = "26.1.10909125"
|
ndkVersion = "26.1.10909125"
|
||||||
kotlinVersion = "1.9.22"
|
kotlinVersion = "1.9.24"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
|||||||
@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
|||||||
# Android operating system, and which are packaged with your app's APK
|
# Android operating system, and which are packaged with your app's APK
|
||||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
# Automatically convert third-party libraries to use AndroidX
|
|
||||||
android.enableJetifier=true
|
|
||||||
|
|
||||||
# Use this property to specify which architecture you want to build.
|
# Use this property to specify which architecture you want to build.
|
||||||
# You can also override it from the CLI using
|
# You can also override it from the CLI using
|
||||||
@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|||||||
# your application. You should enable this flag either if you want
|
# your application. You should enable this flag either if you want
|
||||||
# to write custom TurboModules/Fabric components OR use libraries that
|
# to write custom TurboModules/Fabric components OR use libraries that
|
||||||
# are providing them.
|
# are providing them.
|
||||||
newArchEnabled=false
|
newArchEnabled=true
|
||||||
|
|
||||||
# Use this property to enable or disable the Hermes JS engine.
|
# Use this property to enable or disable the Hermes JS engine.
|
||||||
# If set to false, you will be using JSC instead.
|
# If set to false, you will be using JSC instead.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@ -13,6 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|||||||
@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@ -55,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@ -84,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
pluginManagement { includeBuild("<%= offsetFromRoot %>../node_modules/@react-native/gradle-plugin") }
|
||||||
|
plugins { id("com.facebook.react.settings") }
|
||||||
|
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
|
||||||
rootProject.name = '<%= className %>'
|
rootProject.name = '<%= className %>'
|
||||||
apply from: file("<%= offsetFromRoot %>../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
|
||||||
include ':app'
|
include ':app'
|
||||||
includeBuild('<%= offsetFromRoot %>../node_modules/@react-native/gradle-plugin')
|
includeBuild('<%= offsetFromRoot %>../node_modules/@react-native/gradle-plugin')
|
||||||
|
|||||||
@ -38,6 +38,8 @@ export default defineConfig({
|
|||||||
extensions,
|
extensions,
|
||||||
alias: {
|
alias: {
|
||||||
'react-native': 'react-native-web',
|
'react-native': 'react-native-web',
|
||||||
|
'react-native-svg': 'react-native-svg-web',
|
||||||
|
'@react-native/assets-registry/registry': 'react-native-web/dist/modules/AssetRegistry/index',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
|
|||||||
@ -6,6 +6,8 @@ module.exports = {
|
|||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'react-native$': 'react-native-web',
|
'react-native$': 'react-native-web',
|
||||||
|
'react-native-svg': 'react-native-svg-web',
|
||||||
|
'@react-native/assets-registry/registry': 'react-native-web/dist/modules/AssetRegistry/index',
|
||||||
},
|
},
|
||||||
extensions: ['.web.tsx', '.web.ts', '.web.jsx', '.web.js']
|
extensions: ['.web.tsx', '.web.ts', '.web.jsx', '.web.js']
|
||||||
},
|
},
|
||||||
@ -51,6 +53,8 @@ module.exports = composePlugins(
|
|||||||
config.resolve.alias = {
|
config.resolve.alias = {
|
||||||
...config.resolve.alias ?? {},
|
...config.resolve.alias ?? {},
|
||||||
'react-native$': 'react-native-web',
|
'react-native$': 'react-native-web',
|
||||||
|
'react-native-svg': 'react-native-svg-web',
|
||||||
|
'@react-native/assets-registry/registry': 'react-native-web/dist/modules/AssetRegistry/index',
|
||||||
};
|
};
|
||||||
config.resolve.extensions = [
|
config.resolve.extensions = [
|
||||||
'.web.tsx',
|
'.web.tsx',
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import { hasWebpackPlugin } from '@nx/react/src/utils/has-webpack-plugin';
|
|||||||
import {
|
import {
|
||||||
nxVersion,
|
nxVersion,
|
||||||
reactNativeWebVersion,
|
reactNativeWebVersion,
|
||||||
|
reacttNativeSvgWebVersion,
|
||||||
typesReactDomVersion,
|
typesReactDomVersion,
|
||||||
} from '../../utils/versions';
|
} from '../../utils/versions';
|
||||||
import { NormalizedSchema, normalizeSchema } from './lib/normalize-schema';
|
import { NormalizedSchema, normalizeSchema } from './lib/normalize-schema';
|
||||||
@ -49,6 +50,7 @@ export async function webConfigurationGenerator(
|
|||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
'react-native-web': reactNativeWebVersion,
|
'react-native-web': reactNativeWebVersion,
|
||||||
|
'react-native-svg-web': reacttNativeSvgWebVersion,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
tasks.push(installTask);
|
tasks.push(installTask);
|
||||||
|
|||||||
@ -12,7 +12,9 @@ import {
|
|||||||
babelRuntimeVersion,
|
babelRuntimeVersion,
|
||||||
jestReactNativeVersion,
|
jestReactNativeVersion,
|
||||||
reactNativeBabelPresetVersion,
|
reactNativeBabelPresetVersion,
|
||||||
|
reactNativeCommunityCliVersion,
|
||||||
reactNativeCommunityCliPlatformAndroidVersion,
|
reactNativeCommunityCliPlatformAndroidVersion,
|
||||||
|
reactNativeCommunityCliPlatformIosVersion,
|
||||||
reactNativeMetroConfigVersion,
|
reactNativeMetroConfigVersion,
|
||||||
reactNativeSvgTransformerVersion,
|
reactNativeSvgTransformerVersion,
|
||||||
reactNativeSvgVersion,
|
reactNativeSvgVersion,
|
||||||
@ -36,8 +38,11 @@ export function ensureDependencies(tree: Tree): GeneratorCallback {
|
|||||||
'@react-native/metro-config': reactNativeMetroConfigVersion,
|
'@react-native/metro-config': reactNativeMetroConfigVersion,
|
||||||
'@testing-library/react-native': testingLibraryReactNativeVersion,
|
'@testing-library/react-native': testingLibraryReactNativeVersion,
|
||||||
'@testing-library/jest-native': testingLibraryJestNativeVersion,
|
'@testing-library/jest-native': testingLibraryJestNativeVersion,
|
||||||
|
'@react-native-community/cli': reactNativeCommunityCliVersion,
|
||||||
'@react-native-community/cli-platform-android':
|
'@react-native-community/cli-platform-android':
|
||||||
reactNativeCommunityCliPlatformAndroidVersion,
|
reactNativeCommunityCliPlatformAndroidVersion,
|
||||||
|
'@react-native-community/cli-platform-ios':
|
||||||
|
reactNativeCommunityCliPlatformIosVersion,
|
||||||
'jest-react-native': jestReactNativeVersion,
|
'jest-react-native': jestReactNativeVersion,
|
||||||
'react-test-renderer': reactTestRendererVersion,
|
'react-test-renderer': reactTestRendererVersion,
|
||||||
'react-native-svg-transformer': reactNativeSvgTransformerVersion,
|
'react-native-svg-transformer': reactNativeSvgTransformerVersion,
|
||||||
|
|||||||
@ -1,27 +1,30 @@
|
|||||||
export const nxVersion = require('../../package.json').version;
|
export const nxVersion = require('../../package.json').version;
|
||||||
|
|
||||||
export const reactNativeVersion = '0.74.1';
|
export const reactNativeVersion = '~0.76.3';
|
||||||
|
|
||||||
export const typesNodeVersion = '18.16.9';
|
export const typesNodeVersion = '18.16.9';
|
||||||
|
|
||||||
export const reactNativeCommunityCliPlatformAndroidVersion = '~13.6.6'; // anddroid refers files from this package
|
export const reactNativeCommunityCliVersion = '~15.0.1';
|
||||||
|
export const reactNativeCommunityCliPlatformAndroidVersion = '~15.0.1';
|
||||||
|
export const reactNativeCommunityCliPlatformIosVersion = '~15.0.1';
|
||||||
|
|
||||||
export const reactNativeBabelPresetVersion = '^0.74.83';
|
export const reactNativeBabelPresetVersion = '~0.76.3';
|
||||||
export const reactNativeMetroConfigVersion = '^0.74.83';
|
export const reactNativeMetroConfigVersion = '~0.76.3';
|
||||||
export const reactNativeWebVersion = '^0.19.11';
|
export const reactNativeWebVersion = '~0.19.13';
|
||||||
|
|
||||||
export const reactVersion = '18.2.0';
|
export const reactVersion = '~18.3.1';
|
||||||
export const reactDomVersion = '18.2.0';
|
export const reactDomVersion = '~18.3.1';
|
||||||
export const reactTestRendererVersion = '18.2.0';
|
export const reactTestRendererVersion = '~18.3.1';
|
||||||
export const typesReactVersion = '~18.2.45';
|
export const typesReactVersion = '~18.3.12';
|
||||||
export const typesReactDomVersion = '18.3.0';
|
export const typesReactDomVersion = '~18.3.1';
|
||||||
|
|
||||||
export const testingLibraryReactNativeVersion = '~12.5.0';
|
export const testingLibraryReactNativeVersion = '~12.9.0';
|
||||||
export const testingLibraryJestNativeVersion = '~5.4.3';
|
export const testingLibraryJestNativeVersion = '~5.4.3';
|
||||||
|
|
||||||
export const jestReactNativeVersion = '18.0.0';
|
export const jestReactNativeVersion = '18.0.0';
|
||||||
|
|
||||||
export const reactNativeSvgTransformerVersion = '1.3.0';
|
export const reactNativeSvgTransformerVersion = '~1.5.0';
|
||||||
export const reactNativeSvgVersion = '15.3.0';
|
export const reactNativeSvgVersion = '~15.8.0';
|
||||||
|
export const reacttNativeSvgWebVersion = '~1.0.9';
|
||||||
|
|
||||||
export const babelRuntimeVersion = '7.24.5';
|
export const babelRuntimeVersion = '~7.26.0';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user