Skip to content

Commit

Permalink
use existing gradle allProjects to lock RN version
Browse files Browse the repository at this point in the history
  • Loading branch information
Julesssss committed Nov 7, 2022
1 parent d15ba1b commit 26f9fe6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,9 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])

// Manually set the react-native version to resolve this issue: https://github.com/facebook/react-native/issues/35210
implementation ("com.facebook.react:react-native") version {
strictly "0.70.4"
}

//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
Expand Down
4 changes: 4 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ allprojects {
configurations.all {
resolutionStrategy {
force 'org.xerial:sqlite-jdbc:3.34.0'

// Manually set the react-native version to resolve this upstream issue: https://github.com/facebook/react-native/issues/35210
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())
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
repositories {
Expand Down

0 comments on commit 26f9fe6

Please sign in to comment.