diff --git a/CHANGELOG.md b/CHANGELOG.md index 183579dfb..2da95ab27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ Update ShapeSource methods to make it usable with any cluster ( Use cluster itse feat(camera): Enable `padding` as a root-level prop on the camera, with `bounds.padding*` as fallbacks ([#1538](https://github.com/react-native-mapbox-gl/maps/pull/1538/files)) feat(example): update vertical alignment example ([#1579](https://github.com/react-native-mapbox-gl/maps/pull/1550)) build(android): add telemetry dependency to default build setup ([#1550](https://github.com/react-native-mapbox-gl/maps/pull/1550)) -fix: revert pinned mapLibre version to `5.11.0` ([8a2b00e67ba6398f3f6e6f52e98b0f0cea437e4d](https://github.com/react-native-mapbox-gl/maps/commit/8a2b00e67ba6398f3f6e6f52e98b0f0cea437e4d)) +fix: revert pinned mapLibre version to `5.11.0` ([8a2b00e67ba6398f3f6e6f52e98b0f0cea437e4d](https://github.com/react-native-mapbox-gl/maps/commit/8a2b00e67ba6398f3f6e6f52e98b0f0cea437e4d)) +build: upgrade to RN `0.66` ([#1570](https://github.com/react-native-mapbox-gl/maps/pull/1570)) style(eslint): align root and example with the same configuration ([#1575](https://github.com/react-native-mapbox-gl/maps/pull/1575)) chore(pre-commit): run lint on TS files, change PR template ([#1584](https://github.com/react-native-mapbox-gl/maps/pull/1584)) diff --git a/example/.gitignore b/example/.gitignore index 337b61dcb..8a4c58b26 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -35,6 +35,7 @@ build/ .gradle local.properties *.iml +*.hprof # node.js # diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 79762ffbd..7afa99c74 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -119,6 +119,12 @@ def jscFlavor = 'org.webkit:android-jsc:+' */ def enableHermes = project.ext.react.get("enableHermes", false); +/** + * Architectures to build native code for in debug. + */ +def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures") + + android { ndkVersion rootProject.ext.ndkVersion @@ -155,6 +161,11 @@ android { buildTypes { debug { signingConfig signingConfigs.debug + if (nativeArchitectures) { + ndk { + abiFilters nativeArchitectures.split(',') + } + } } release { // Caution! In production, you need to generate your own keystore file. @@ -214,7 +225,7 @@ dependencies { // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { - from configurations.compile + from configurations.implementation into 'libs' } diff --git a/example/android/app/src/debug/java/com/rnmapboxglexample/ReactNativeFlipper.java b/example/android/app/src/debug/java/com/rnmapboxglexample/ReactNativeFlipper.java index fd84f4b9c..4a1334c2f 100644 --- a/example/android/app/src/debug/java/com/rnmapboxglexample/ReactNativeFlipper.java +++ b/example/android/app/src/debug/java/com/rnmapboxglexample/ReactNativeFlipper.java @@ -40,7 +40,8 @@ public static void initializeFlipper(Context context, ReactInstanceManager react new NetworkingModule.CustomClientBuilder() { @Override public void apply(OkHttpClient.Builder builder) { - builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); + // FIXME: had to disable for RN 0.66 upgrade + // builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); } }); client.addPlugin(networkFlipperPlugin); @@ -54,7 +55,8 @@ public void apply(OkHttpClient.Builder builder) { new ReactInstanceManager.ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { - reactInstanceManager.removeReactInstanceEventListener(this); + // FIXME: had to disable for RN 0.66 upgrade + // reactInstanceManager.removeReactInstanceEventListener(this); reactContext.runOnNativeModulesQueueThread( new Runnable() { @Override diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 9fab0be74..24bc06136 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -3,7 +3,6 @@ diff --git a/example/android/build.gradle b/example/android/build.gradle index 3b6740558..02dce2b6c 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -2,11 +2,11 @@ buildscript { ext { - buildToolsVersion = "29.0.3" + buildToolsVersion = "30.0.2" minSdkVersion = 21 - compileSdkVersion = 29 - targetSdkVersion = 29 - ndkVersion = "20.1.5948944" + compileSdkVersion = 30 + targetSdkVersion = 30 + ndkVersion = "21.4.7075529" useMapLibre = false @@ -32,6 +32,7 @@ buildscript { } repositories { google() + mavenCentral() jcenter() } dependencies { @@ -43,6 +44,7 @@ buildscript { allprojects { repositories { + mavenCentral() mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm diff --git a/example/android/gradle.properties b/example/android/gradle.properties index e1344b31d..6bae022b9 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -20,5 +20,5 @@ android.useAndroidX=true android.enableJetifier=true -FLIPPER_VERSION=0.75.1 +FLIPPER_VERSION=0.99.0 diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 14e30f741..7665b0fa9 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/example/ios/Podfile b/example/ios/Podfile index 317d64f74..05420eee4 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,7 +1,7 @@ require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' -platform :ios, '10.0' +platform :ios, '11.0' useMapLibre = false @@ -60,12 +60,14 @@ target 'RNMapboxGLExample' do use_flipper!() post_install do |installer| react_native_post_install(installer) + __apply_Xcode_12_5_M1_post_install_workaround(installer) $RNMBGL.post_install(installer) end else # CI configuration post_install do |installer| react_native_post_install(installer) + __apply_Xcode_12_5_M1_post_install_workaround(installer) $RNMBGL.post_install(installer) end end diff --git a/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj b/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj index 5c983092b..45a904503 100644 --- a/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj +++ b/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj @@ -343,12 +343,14 @@ "${PODS_ROOT}/Target Support Files/Pods-RNMapboxGLExample/Pods-RNMapboxGLExample-frameworks.sh", "${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework", "${BUILT_PRODUCTS_DIR}/MapboxMobileEvents/MapboxMobileEvents.framework", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMobileEvents.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -403,7 +405,7 @@ "FB_SONARKIT_ENABLED=1", ); INFOPLIST_FILE = RNMapboxGLExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -425,7 +427,7 @@ CURRENT_PROJECT_VERSION = 1; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = RNMapboxGLExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -486,7 +488,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -540,7 +542,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", diff --git a/example/package.json b/example/package.json index 227f8f2d4..57a8812f1 100644 --- a/example/package.json +++ b/example/package.json @@ -34,8 +34,8 @@ "moment": "^2.24.0", "npm": "^6.13.4", "prop-types": "^15.7.2", - "react": "17.0.1", - "react-native": "0.64.2", + "react": "17.0.2", + "react-native": "0.66.0", "react-native-elements": "^3.4.2", "react-native-gesture-handler": "^1.6.1", "react-native-safe-area-context": "^3.1.9", @@ -52,7 +52,7 @@ "@types/react": "^17.0.0", "@types/react-native": "^0.65.2", "babel-plugin-module-resolver": "^4.1.0", - "detox": "^18.7.1", + "detox": "^18.22.2", "glob-to-regexp": "^0.4.0", "jest": "^27.1.0", "jest-circus": "^27.1.1",