Skip to content

Commit d92338a

Browse files
committed
Update to React Native 0.68.0
1 parent e7311e1 commit d92338a

File tree

6 files changed

+2412
-1677
lines changed

6 files changed

+2412
-1677
lines changed

Gemfile.lock

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GEM
33
specs:
44
CFPropertyList (3.0.5)
55
rexml
6-
activesupport (6.1.4.4)
6+
activesupport (6.1.5)
77
concurrent-ruby (~> 1.0, >= 1.0.2)
88
i18n (>= 1.6, < 2)
99
minitest (>= 5.1)
@@ -16,10 +16,10 @@ GEM
1616
json (>= 1.5.1)
1717
atomos (0.1.3)
1818
claide (1.1.0)
19-
cocoapods (1.11.2)
19+
cocoapods (1.11.3)
2020
addressable (~> 2.8)
2121
claide (>= 1.0.2, < 2.0)
22-
cocoapods-core (= 1.11.2)
22+
cocoapods-core (= 1.11.3)
2323
cocoapods-deintegrate (>= 1.0.3, < 2.0)
2424
cocoapods-downloader (>= 1.4.0, < 2.0)
2525
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -34,7 +34,7 @@ GEM
3434
nap (~> 1.0)
3535
ruby-macho (>= 1.0, < 3.0)
3636
xcodeproj (>= 1.21.0, < 2.0)
37-
cocoapods-core (1.11.2)
37+
cocoapods-core (1.11.3)
3838
activesupport (>= 5.0, < 7)
3939
addressable (~> 2.8)
4040
algoliasearch (~> 1.0)
@@ -45,7 +45,7 @@ GEM
4545
public_suffix (~> 4.0)
4646
typhoeus (~> 1.0)
4747
cocoapods-deintegrate (1.0.5)
48-
cocoapods-downloader (1.5.1)
48+
cocoapods-downloader (1.6.2)
4949
cocoapods-plugins (1.0.0)
5050
nap
5151
cocoapods-search (1.0.1)
@@ -54,7 +54,7 @@ GEM
5454
netrc (~> 0.11)
5555
cocoapods-try (1.2.0)
5656
colored2 (3.1.2)
57-
concurrent-ruby (1.1.9)
57+
concurrent-ruby (1.1.10)
5858
escape (0.0.4)
5959
ethon (0.15.0)
6060
ffi (>= 1.15.0)
@@ -63,7 +63,7 @@ GEM
6363
fuzzy_match (2.0.4)
6464
gh_inspector (1.1.3)
6565
httpclient (2.8.3)
66-
i18n (1.9.1)
66+
i18n (1.10.0)
6767
concurrent-ruby (~> 1.0)
6868
json (2.6.1)
6969
minitest (5.15.0)

android/app/build.gradle

+28-8
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,20 @@ android {
186186
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
187187
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
188188
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
189+
190+
// Due to a bug inside AGP, we have to explicitly set a dependency
191+
// between configureNdkBuild* tasks and the preBuild tasks.
192+
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
193+
configureNdkBuildRelease.dependsOn(preReleaseBuild)
194+
configureNdkBuildDebug.dependsOn(preDebugBuild)
195+
reactNativeArchitectures().each { architecture ->
196+
tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
197+
dependsOn("preDebugBuild")
198+
}
199+
tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
200+
dependsOn("preReleaseBuild")
201+
}
202+
}
189203
}
190204
}
191205
splits {
@@ -237,14 +251,8 @@ android {
237251
dependencies {
238252
implementation fileTree(dir: "libs", include: ["*.jar"])
239253

240-
// If new architecture is enabled, we let you build RN from source
241-
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
242-
if (isNewArchitectureEnabled()) {
243-
implementation project(":ReactAndroid")
244-
} else {
245-
//noinspection GradleDynamicVersion
246-
implementation "com.facebook.react:react-native:+" // From node_modules
247-
}
254+
//noinspection GradleDynamicVersion
255+
implementation "com.facebook.react:react-native:+" // From node_modules
248256

249257
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
250258

@@ -270,6 +278,18 @@ dependencies {
270278
}
271279
}
272280

281+
if (isNewArchitectureEnabled()) {
282+
// If new architecture is enabled, we let you build RN from source
283+
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
284+
// This will be applied to all the imported transtitive dependency.
285+
configurations.all {
286+
resolutionStrategy.dependencySubstitution {
287+
substitute(module("com.facebook.react:react-native"))
288+
.using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
289+
}
290+
}
291+
}
292+
273293
// Run this once to be able to run the application with BUCK
274294
// puts all compile dependencies into folder libs for BUCK to use
275295
task copyDownloadableDepsToLibs(type: Copy) {

ios/Podfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ target 'EnderChat' do
1515
# to enable hermes on iOS, change `false` to `true` and then install pods
1616
:hermes_enabled => flags[:hermes_enabled],
1717
:fabric_enabled => flags[:fabric_enabled],
18-
# An abosolute path to your application root.
19-
:app_path => "#{Dir.pwd}/.."
18+
# An absolute path to your application root.
19+
:app_path => "#{Pod::Config.instance.installation_root}/.."
2020
)
2121

2222
target 'EnderChatTests' do

0 commit comments

Comments
 (0)