Skip to content

Commit

Permalink
Remove dependency on libevent (facebook#41485)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#41485

Now that React-Hermes does not depends on folly::Futures anymore, we can safely delete the `libevent` dependency.
This will speedup the pod install step and potentially also the bundle size (to be tested)

## Changelog
[Android][Removed] - Remove libevent dependency

Reviewed By: javache

Differential Revision: D51319583

fbshipit-source-id: 155cc3632b005074c43565e7281c9873ab046f0d
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Nov 15, 2023
1 parent 23cf104 commit 7f52791
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 605 deletions.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions packages/react-native/ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def DOUBLE_CONVERSION_VERSION = libs.versions.doubleconversion.get()
def FMT_VERSION = libs.versions.fmt.get()
def FOLLY_VERSION = libs.versions.folly.get()
def GLOG_VERSION = libs.versions.glog.get()
def LIBEVENT_VERSION = libs.versions.libevent.get()
def GTEST_VERSION = libs.versions.gtest.get()

final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTask) {
Expand Down Expand Up @@ -326,22 +325,6 @@ task prepareFmt(dependsOn: dependenciesPath ? [] : [downloadFmt], type: Copy) {
into("$thirdPartyNdkDir/fmt")
}

task downloadLibevent(dependsOn: createNativeDepsDirectories, type: Download) {
src("https://github.com/libevent/libevent/releases/download/release-${LIBEVENT_VERSION}-stable/libevent-${LIBEVENT_VERSION}-stable.tar.gz")
onlyIfModified(true)
overwrite(false)
retries(5)
dest(new File(downloadsDir, "libevent-${LIBEVENT_VERSION}.tar.gz"))
}


final def prepareLibevent = tasks.register("prepareLibevent", PrepareLibeventTask) {
it.dependsOn(dependenciesPath ? [] : [downloadLibevent])
it.libeventPath.setFrom(dependenciesPath ?: tarTree(downloadLibevent.dest))
it.libeventVersion.set(LIBEVENT_VERSION)
it.outputDir.set(new File(thirdPartyNdkDir, "libevent"))
}

task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) {
src("https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz")
onlyIfModified(true)
Expand Down Expand Up @@ -603,7 +586,6 @@ android {
prepareGlog,
prepareGtest,
prepareJSC,
prepareLibevent,
preparePrefab
)
generateCodegenSchemaFromJavaScript.dependsOn(buildCodegenCLITask)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def cmakeVersion = parent.cmake_version
* users to install CMake externally.
*/
def findCmakePath(cmakeVersion) {
def cmakeRelativePath = "/cmake/${cmakeVersion}/bin/cmake"
def cmakeRelativePath = "cmake/${cmakeVersion}/bin/cmake"
if (System.getenv("ANDROID_SDK_ROOT") && new File("${System.getenv("ANDROID_SDK_ROOT")}/${cmakeRelativePath}").exists()) {
return "${System.getenv("ANDROID_SDK_ROOT")}/${cmakeRelativePath}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ add_react_third_party_ndk_subdir(glog)
add_react_third_party_ndk_subdir(boost)
add_react_third_party_ndk_subdir(double-conversion)
add_react_third_party_ndk_subdir(fmt)
add_react_third_party_ndk_subdir(libevent)
add_react_third_party_ndk_subdir(folly)
add_react_third_party_ndk_subdir(jsc)
add_react_third_party_ndk_subdir(googletest)
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7f52791

Please sign in to comment.