Remove RSocket

Summary:
^
Changelog: Remove rsocket dependency for Android

Reviewed By: aigoncharov

Differential Revision: D34418565

fbshipit-source-id: d2bfd6cede3c85709e252a8205525aa4595b4791
This commit is contained in:
Lorenzo Blasa
2022-02-25 02:33:22 -08:00
committed by Facebook GitHub Bot
parent 9aed8ce02d
commit 30becc1ced
7 changed files with 2 additions and 172 deletions

View File

@@ -193,23 +193,6 @@ task finalizeLibEvent(dependsOn: [prepareLibEvent2], type: Copy) {
into "$externalDir/LibEvent/libevent-2.1.11-stable/" into "$externalDir/LibEvent/libevent-2.1.11-stable/"
} }
task downloadRSocket(dependsOn: [], type: Download) {
onlyIf { isCacheOutOfDate(CACHE_REVISION) }
src 'https://github.com/priteshrnandgaonkar/rsocket-cpp/archive/0.10.7.tar.gz'
onlyIfNewer true
overwrite false
dest new File(downloadsDir, 'rsocket-' + getDownloadFileName(src))
}
task prepareRSocket(dependsOn: [downloadRSocket], type: Copy) {
onlyIf { isCacheOutOfDate(CACHE_REVISION) }
from tarTree(downloadRSocket.dest)
from './overrides/RSocket/'
include 'rsocket-cpp-0.10.7/**/*', 'build.gradle', 'ApplicationManifest.xml', 'CMakeLists.txt'
includeEmptyDirs = false
into "$externalDir/RSocket"
}
task writeCacheRevision(dependsOn: createNativeDepsDirectories) { task writeCacheRevision(dependsOn: createNativeDepsDirectories) {
doLast { doLast {
buildDir.mkdirs() buildDir.mkdirs()
@@ -223,7 +206,6 @@ def allTasks = [
prepareBoost, prepareBoost,
finalizeFolly, finalizeFolly,
finalizeLibEvent, finalizeLibEvent,
prepareRSocket,
writeCacheRevision, writeCacheRevision,
] ]

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) Meta Platforms, Inc. and affiliates.
~
~ This source code is licensed under the MIT license found in the LICENSE
~ file in the root directory of this source tree.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rsocket">
</manifest>

View File

@@ -1,86 +0,0 @@
cmake_minimum_required (VERSION 3.6.0)
PROJECT(rsocket CXX)
set(PACKAGE_NAME rsocket)
set(RSOCKET_VERSION 0.10.7)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
set(third_party_ndk ${PROJECT_SOURCE_DIR}/../)
set(libfolly_DIR ${third_party_ndk}/folly/)
set(glog_DIR ${third_party_ndk}/glog)
set(BOOST_DIR ${third_party_ndk}/boost/boost_1_63_0/)
set(LIBEVENT_DIR ${third_party_ndk}/LibEvent/libevent-2.1.11-stable/)
set(DOUBLECONVERSION_DIR ${third_party_ndk}/double-conversion/double-conversion-3.0.0/)
set(RSOCKET_ROOT_DIR ${PROJECT_SOURCE_DIR}/rsocket-cpp-${RSOCKET_VERSION})
set(RSOCKET_DIR ${PROJECT_SOURCE_DIR}/rsocket-cpp-${RSOCKET_VERSION}/rsocket)
list(APPEND dir_list ${RSOCKET_ROOT_DIR}/)
list(APPEND dir_list ${RSOCKET_DIR}/)
list(APPEND dir_list ${RSOCKET_DIR}/framing)
list(APPEND dir_list ${RSOCKET_DIR}/internal)
list(APPEND dir_list ${RSOCKET_DIR}/statemachine)
list(APPEND dir_list ${RSOCKET_DIR}/transports)
list(APPEND dir_list ${RSOCKET_DIR}/transports/tcp)
list(APPEND dir_list ${RSOCKET_ROOT_DIR}/yarpl/flowable)
list(APPEND dir_list ${RSOCKET_ROOT_DIR}/yarpl/observable)
list(APPEND dir_list ${RSOCKET_ROOT_DIR}/yarpl/utils)
file(GLOB SRC_FILES ${RSOCKET_DIR}/*.cpp
${RSOCKET_DIR}/internal/*.cpp
${RSOCKET_DIR}/framing/*.cpp
${RSOCKET_DIR}/statemachine/*.cpp
${RSOCKET_DIR}/transports/*.cpp
${RSOCKET_DIR}/transports/tcp/*.cpp
${RSOCKET_ROOT_DIR}/yarpl/observable/*.cpp
${RSOCKET_ROOT_DIR}/yarpl/flowable/*.cpp
${RSOCKET_ROOT_DIR}/yarpl/utils/*.cpp
)
include_directories(${dir_list})
add_compile_options(
-DFOLLY_HAVE_CLOCK_GETTIME=1
-DFOLLY_HAVE_PTHREAD=1
-DFOLLY_NO_CONFIG=1
-DFOLLY_HAVE_MEMRCHR
-DFOLLY_MOBILE=1
-DFOLLY_USE_LIBCPP=1
-DFOLLY_HAVE_LIBJEMALLOC=0
-DFOLLY_HAVE_PREADV=0
-frtti
-fexceptions
-Wno-error
-Wno-unused-local-typedefs
-Wno-unused-variable
-Wno-sign-compare
-Wno-comment
-Wno-return-type
-Wno-tautological-constant-compare
)
find_package(openssl REQUIRED CONFIG)
add_library(${PACKAGE_NAME} STATIC ${SRC_FILES})
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
set(libfolly_build_DIR ${build_DIR}/libfolly/${ANDROID_ABI})
file(MAKE_DIRECTORY ${build_DIR})
add_subdirectory(${libfolly_DIR} ${libfolly_build_DIR})
target_include_directories(${PACKAGE_NAME} PRIVATE
${libfolly_DIR}
${BOOST_DIR}
${BOOST_DIR}/../
${LIBEVENT_DIR}/
${LIBEVENT_DIR}/include/
${LIBEVENT_DIR}/include/event2
${glog_DIR}
${glog_DIR}/../
${glog_DIR}/glog-0.3.5/src/
)
target_link_libraries(${PACKAGE_NAME} folly glog double-conversion log event openssl::ssl openssl::crypto)

View File

@@ -1,46 +0,0 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
ndkVersion rootProject.ndkVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_shared'
}
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest.srcFile './ApplicationManifest.xml'
}
}
externalNativeBuild {
cmake {
path './CMakeLists.txt'
}
}
buildFeatures {
prefab true
}
dependencies {
implementation deps.openssl
}
}

View File

@@ -13,7 +13,6 @@ include ':tutorial'
include ':doubleconversion' include ':doubleconversion'
include ':glog' include ':glog'
include ':libevent' include ':libevent'
include ':rsocket'
include ':third-party' include ':third-party'
include ':noop' include ':noop'
@@ -25,7 +24,6 @@ project(':doubleconversion').projectDir = file('android/third-party/external/dou
project(':glog').projectDir = file('android/third-party/external/glog/') project(':glog').projectDir = file('android/third-party/external/glog/')
project(':folly').projectDir = file('android/third-party/external/folly/') project(':folly').projectDir = file('android/third-party/external/folly/')
project(':libevent').projectDir = file('android/third-party/external/LibEvent/') project(':libevent').projectDir = file('android/third-party/external/LibEvent/')
project(':rsocket').projectDir = file('android/third-party/external/RSocket/')
project(':third-party').projectDir = file('android/third-party/') project(':third-party').projectDir = file('android/third-party/')
project(':noop').projectDir = file('android/no-op/') project(':noop').projectDir = file('android/no-op/')

View File

@@ -9,10 +9,8 @@ set(CMAKE_VERBOSE_MAKEFILE on)
set(PACKAGE_NAME flippercpp) set(PACKAGE_NAME flippercpp)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
set(RSOCKET_VERSION 0.10.7)
set(external_DIR ${PROJECT_SOURCE_DIR}/../android/third-party/external) set(external_DIR ${PROJECT_SOURCE_DIR}/../android/third-party/external)
set(libfolly_DIR ${external_DIR}/folly/) set(libfolly_DIR ${external_DIR}/folly/)
set(rsocket_DIR ${external_DIR}/RSocket/)
set(glog_DIR ${external_DIR}/glog) set(glog_DIR ${external_DIR}/glog)
set(BOOST_DIR ${external_DIR}/boost/boost_1_63_0/) set(BOOST_DIR ${external_DIR}/boost/boost_1_63_0/)
set(LIBEVENT_DIR ${external_DIR}/LibEvent/libevent-2.1.11-stable/) set(LIBEVENT_DIR ${external_DIR}/LibEvent/libevent-2.1.11-stable/)
@@ -49,20 +47,16 @@ add_library(${PACKAGE_NAME} STATIC ${SOURCES})
set(build_DIR ${CMAKE_SOURCE_DIR}/build) set(build_DIR ${CMAKE_SOURCE_DIR}/build)
set(libfolly_build_DIR ${build_DIR}/libfolly/${ANDROID_ABI}) set(libfolly_build_DIR ${build_DIR}/libfolly/${ANDROID_ABI})
set(rsocket_build_DIR ${build_DIR}/rsocket/${ANDROID_ABI})
file(MAKE_DIRECTORY ${build_DIR}) file(MAKE_DIRECTORY ${build_DIR})
add_subdirectory(${rsocket_DIR} ${rsocket_build_DIR}) add_subdirectory(${libfolly_DIR} ${libfolly_build_DIR})
message(STATUS "RSocket DIR:- " ${rsocket_DIR})
target_include_directories(${PACKAGE_NAME} PRIVATE target_include_directories(${PACKAGE_NAME} PRIVATE
${libfolly_DIR} ${libfolly_DIR}
${BOOST_DIR} ${BOOST_DIR}
${BOOST_DIR}/../ ${BOOST_DIR}/../
${LIBEVENT_DIR}/ ${LIBEVENT_DIR}/
${rsocket_DIR}/rsocket-cpp-${RSOCKET_VERSION}
${LIBEVENT_DIR}/include/ ${LIBEVENT_DIR}/include/
${LIBEVENT_DIR}/include/event2 ${LIBEVENT_DIR}/include/event2
${OPENSSL_DIR}/include ${OPENSSL_DIR}/include
@@ -71,4 +65,4 @@ target_include_directories(${PACKAGE_NAME} PRIVATE
${glog_DIR}/glog-0.3.5/src/ ${glog_DIR}/glog-0.3.5/src/
) )
target_link_libraries(${PACKAGE_NAME} folly rsocket glog double-conversion log event openssl::ssl openssl::crypto) target_link_libraries(${PACKAGE_NAME} folly glog double-conversion log event openssl::ssl openssl::crypto)

View File

@@ -39,7 +39,6 @@ android {
dependencies { dependencies {
implementation project(':third-party') implementation project(':third-party')
implementation project(':rsocket')
implementation project(':folly') implementation project(':folly')
implementation deps.openssl implementation deps.openssl
} }