Skip to content

Commit

Permalink
Merge branch 'main' into @aleqsio/update-react-native-maps
Browse files Browse the repository at this point in the history
  • Loading branch information
aleqsio committed Oct 6, 2022
2 parents fad27c1 + 56fe5e7 commit d959698
Show file tree
Hide file tree
Showing 220 changed files with 5,128 additions and 3,233 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -11,7 +11,10 @@ Package-specific changes not released in any SDK will be added here just before
- Updated `@shopify/flash-list` from `1.1.0` to `1.3.0`. ([#19317](https://github.com/expo/expo/pull/19317) by [@kudo](https://github.com/kudo))
- Updated `react-native-webview` from `11.23.0` to `11.23.1`. ([#19375](https://github.com/expo/expo/pull/19375) by [@aleqsio](https://github.com/aleqsio))
- Updated `react-native-gesture-handler` from `2.5.0` to `2.7.0`. ([#19362](https://github.com/expo/expo/pull/19362) by [@tsapeta](https://github.com/tsapeta))
- Updated `@react-native-community/netinfo` from `9.3.0` to `9.3.3`. ([#19421](https://github.com/expo/expo/pull/19421) by [@douglowder](https://github.com/douglowder))
- Updated `@react-native-picker/picker` from `2.4.2` to `2.4.6`. ([#19390](https://github.com/expo/expo/pull/19390) by [@aleqsio](https://github.com/aleqsio))
- Updated `react-native-screens` from `3.15.0` to `3.18.0`. ([#19383](https://github.com/expo/expo/pull/19383) by [@tsapeta](https://github.com/tsapeta))
- Updated `@shopify/react-native-skia` from `0.1.136` to `0.1.153`. ([#19360](https://github.com/expo/expo/pull/19360) by [@kudo](https://github.com/kudo))
- Updated `react-native-maps` from `0.31.1` to `1.3.2`. ([#19414](https://github.com/expo/expo/pull/19414) by [@aleqsio](https://github.com/aleqsio))

### 🛠 Breaking changes
Expand Down
5 changes: 0 additions & 5 deletions android/expoview/build.gradle
Expand Up @@ -392,11 +392,6 @@ dependencies {
}
}

// react-native-screens
api 'androidx.fragment:fragment:1.2.2'
api 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
api 'com.google.android.material:material:1.1.0'

api 'com.google.firebase:firebase-core:17.2.3'
api 'com.google.firebase:firebase-messaging:22.0.0'
api 'com.google.maps.android:android-maps-utils:0.5'
Expand Down
Expand Up @@ -9,6 +9,7 @@ import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ViewManager
import com.shopify.reactnative.flash_list.ReactNativeFlashListPackage
import com.shopify.reactnative.skia.RNSkiaPackage
import com.swmansion.rnscreens.RNScreensPackage
import com.swmansion.gesturehandler.RNGestureHandlerPackage
import com.swmansion.gesturehandler.react.RNGestureHandlerModule
import expo.modules.adapters.react.ReactModuleRegistryProvider
Expand Down Expand Up @@ -43,7 +44,6 @@ import versioned.host.exp.exponent.modules.api.components.webview.RNCWebViewPack
import versioned.host.exp.exponent.modules.api.netinfo.NetInfoModule
import versioned.host.exp.exponent.modules.api.notifications.NotificationsModule
import versioned.host.exp.exponent.modules.api.safeareacontext.SafeAreaContextPackage
import versioned.host.exp.exponent.modules.api.screens.RNScreensPackage
import versioned.host.exp.exponent.modules.api.viewshot.RNViewShotModule
import versioned.host.exp.exponent.modules.internal.DevMenuModule
import versioned.host.exp.exponent.modules.test.ExponentTestNativeModule
Expand Down
Expand Up @@ -125,6 +125,10 @@ void updateAndSend() {
NetworkCapabilities.NET_CAPABILITY_VALIDATED)
&& !isInternetSuspended;

if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
isInternetReachable = isInternetReachable && capabilities.getLinkDownstreamBandwidthKbps() != 0;
}

// Get the cellular network type
if (network != null && connectionType == ConnectionType.CELLULAR && isInternetReachable) {
cellularGeneration = CellularGeneration.fromNetworkInfo(networkInfo);
Expand Down

This file was deleted.

Expand Up @@ -138,7 +138,6 @@ android {
externalNativeBuild {
cmake {
path file('CMakeLists.txt')
version '3.10.2'
}
}

Expand Down
@@ -1,5 +1,11 @@
project(RNSkia)
cmake_minimum_required(VERSION 3.4.1)

if(${BUILD_TYPE} STREQUAL "debug")
set (CMAKE_BUILD_TYPE Debug)
message("-- Building with Debug Symbols")
endif()

set (CMAKE_VERBOSE_MAKEFILE ON)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSK_GL -DSK_BUILD_FOR_ANDROID -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DON_ANDROID -DONANDROID")
Expand Down Expand Up @@ -29,23 +35,21 @@ add_library(
SHARED
"${PROJECT_SOURCE_DIR}/cpp/jni/JniLoad.cpp"
"${PROJECT_SOURCE_DIR}/cpp/jni/JniSkiaManager.cpp"
"${PROJECT_SOURCE_DIR}/cpp/jni/JniSkiaDrawView.cpp"

"${PROJECT_SOURCE_DIR}/cpp/jni/JniPlatformContext.cpp"
"${PROJECT_SOURCE_DIR}/cpp/rnskia-android/RNSkDrawViewImpl.cpp"
"${PROJECT_SOURCE_DIR}/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp"
"${PROJECT_SOURCE_DIR}/cpp/rnskia-android/SkiaOpenGLRenderer.cpp"

"${PROJECT_SOURCE_DIR}/../cpp/jsi/JsiHostObject.cpp"

"${PROJECT_SOURCE_DIR}/../cpp/rnskia/RNSkManager.cpp"
"${PROJECT_SOURCE_DIR}/../cpp/rnskia/RNSkDrawView.cpp"
"${PROJECT_SOURCE_DIR}/../cpp/rnskia/RNSkJsView.cpp"
"${PROJECT_SOURCE_DIR}/../cpp/rnskia/RNSkDispatchQueue.cpp"


"${PROJECT_SOURCE_DIR}/../cpp/api/third_party/CSSColorParser.cpp"

)


target_include_directories(
${PACKAGE_NAME}
PRIVATE
Expand Down

This file was deleted.

Expand Up @@ -127,7 +127,9 @@ android {
arguments '-DANDROID_STL=c++_shared',
"-DREACT_NATIVE_VERSION=${REACT_NATIVE_VERSION}",
"-DNODE_MODULES_DIR=${nodeModules}",
"-DPREBUILT_DIR=${prebuiltDir}"
"-DPREBUILT_DIR=${prebuiltDir}",
"-DBUILD_TYPE=${buildType}"

}
}
}
Expand All @@ -137,8 +139,7 @@ android {

externalNativeBuild {
cmake {
path file('CMakeLists.txt')
version '3.10.2'
path file('CMakeLists.txt')
}
}

Expand Down Expand Up @@ -260,7 +261,7 @@ def nativeBuildDependsOn(dependsOnTask, variant) {

afterEvaluate {
nativeBuildDependsOn(extractAARHeaders, null)
nativeBuildDependsOn(extractJNIFiles, null)
nativeBuildDependsOn(extractJNIFiles, null)
}

tasks.whenTaskAdded { task ->
Expand Down
@@ -1,13 +1,15 @@
#include "JniPlatformContext.h"
#include "JniSkiaDrawView.h"
#include "JniSkiaPictureView.h"
#include "JniSkiaManager.h"
#include <fbjni/fbjni.h>
#include <jni.h>

JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
return facebook::jni::initialize(vm, [] {
RNSkia::JniSkiaManager::registerNatives();
RNSkia::JniSkiaDrawView::registerNatives();
RNSkia::JniPlatformContext::registerNatives();
});
return facebook::jni::initialize(vm, [] {
RNSkia::JniSkiaManager::registerNatives();
RNSkia::JniSkiaDrawView::registerNatives();
RNSkia::JniSkiaPictureView::registerNatives();
RNSkia::JniPlatformContext::registerNatives();
});
}

This file was deleted.

Expand Up @@ -16,13 +16,8 @@ using namespace facebook;
void JniSkiaManager::registerNatives() {
registerHybrid({
makeNativeMethod("initHybrid", JniSkiaManager::initHybrid),
makeNativeMethod(
"initializeRuntime", JniSkiaManager::initializeRuntime),
makeNativeMethod("registerSkiaView", JniSkiaManager::registerSkiaView),
makeNativeMethod(
"unregisterSkiaView", JniSkiaManager::unregisterSkiaView),
makeNativeMethod(
"invalidate", JniSkiaManager::invalidate),
makeNativeMethod("initializeRuntime", JniSkiaManager::initializeRuntime),
makeNativeMethod("invalidate", JniSkiaManager::invalidate),
});
}

Expand All @@ -46,12 +41,4 @@ void JniSkiaManager::initializeRuntime() {
_skManager = std::make_shared<RNSkManager>(_jsRuntime, _jsCallInvoker, _context);
}

void JniSkiaManager::registerSkiaView(int viewTag, JniSkiaDrawView *skiaView) {
_skManager->registerSkiaDrawView(viewTag, skiaView->getDrawViewImpl());
}

void JniSkiaManager::unregisterSkiaView(int viewTag) {
_skManager->unregisterSkiaDrawView(viewTag);
}

} // namespace RNSkia

0 comments on commit d959698

Please sign in to comment.