Skip to content

Commit

Permalink
Bump gradle version (#518)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #518

This diff updates the minimum gradle plugin version for building the
Hermes OSS release in order to avoid problems in older versions of
the Android NDK.

Specifically, there was a bug
(android/ndk#1166) in the Android NDK that
caused the exception handling functions in `libc++` to be incorrectly
exported. Depending on link order, this can lead to  `libhermes.so`
not statically linking in `_Unwind_resume`, and expecting it instead
to be resolved dynamically to the version in `libc++`. However, if
we're linking against an RN version that was built against the new
version of the NDK, those symbols may not be exported, and end up
unresolved (which crashes the app).

To allow Hermes to be built with newer versions of the NDK, we need
to bump up the gradle plugin version to 4.1. RN already uses 4.1.

Bumping the gradle version seems to break the intl tests unless we
add `useLibrary 'android.test.base'` to the gradle file, so do that.
(we're technically supposed to have that anyway)

Reviewed By: mhorowitz

Differential Revision: D28763472

fbshipit-source-id: 00ffcfa94ee83a9dee0ac894e20e83867200865b
  • Loading branch information
neildhar authored and facebook-github-bot committed Jun 2, 2021
1 parent 3415dd0 commit f61a798
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath("de.undercouch:gradle-download-task:4.0.2")
}
}
Expand Down
2 changes: 2 additions & 0 deletions android/intltest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ android {
}
}

useLibrary 'android.test.base'

dependencies {
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
Expand Down

0 comments on commit f61a798

Please sign in to comment.