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/"
}
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) {
doLast {
buildDir.mkdirs()
@@ -223,7 +206,6 @@ def allTasks = [
prepareBoost,
finalizeFolly,
finalizeLibEvent,
prepareRSocket,
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
}
}