Skip to content

Commit

Permalink
[templates] Override version to handle bug introduced with release of…
Browse files Browse the repository at this point in the history
… react-native@0.71-rc
  • Loading branch information
brentvatne committed Nov 4, 2022
1 parent 60eefc0 commit 02fb0a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/expo-template-bare-minimum/android/build.gradle
Expand Up @@ -32,7 +32,15 @@ buildscript {
}
}

def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

allprojects {
configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}

repositories {
mavenLocal()
maven {
Expand Down

2 comments on commit 02fb0a9

@nas-pearl
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there, is there a permanent fix for this now instead of using this file?

@brentvatne
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nas-pearl - yes, you can read more here: facebook/react-native#35210 (comment)

Please sign in to comment.