Skip to content

Commit dcb23b0

Browse files
committed
fix: removelistener for react-native>=65.0 break changes
1 parent 59b2caf commit dcb23b0

File tree

21 files changed

+2444
-2248
lines changed

21 files changed

+2444
-2248
lines changed

.flowconfig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ node_modules/react-native/flow/
2323
[options]
2424
emoji=true
2525

26-
esproposal.optional_chaining=enable
27-
esproposal.nullish_coalescing=enable
28-
2926
exact_by_default=true
3027

28+
format.bracket_spacing=false
29+
3130
module.file_ext=.js
3231
module.file_ext=.json
3332
module.file_ext=.ios.js
@@ -63,4 +62,4 @@ untyped-import
6362
untyped-type-import
6463

6564
[version]
66-
^0.137.0
65+
^0.158.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ DerivedData
2828
*.ipa
2929
*.xcuserstate
3030
project.xcworkspace
31+
*.hprof
3132

3233
# Android/IJ
3334
#
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

example/android/app/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ def jscFlavor = 'org.webkit:android-jsc:+'
119119
*/
120120
def enableHermes = project.ext.react.get("enableHermes", false);
121121

122+
/**
123+
* Architectures to build native code for in debug.
124+
*/
125+
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
126+
122127
android {
123128
compileSdkVersion rootProject.ext.compileSdkVersion
124129

@@ -153,6 +158,11 @@ android {
153158
buildTypes {
154159
debug {
155160
signingConfig signingConfigs.debug
161+
if (nativeArchitectures) {
162+
ndk {
163+
abiFilters nativeArchitectures.split(',')
164+
}
165+
}
156166
}
157167
release {
158168
// Caution! In production, you need to generate your own keystore file.
@@ -219,7 +229,7 @@ dependencies {
219229
// Run this once to be able to run the application with BUCK
220230
// puts all compile dependencies into folder libs for BUCK to use
221231
task copyDownloadableDepsToLibs(type: Copy) {
222-
from configurations.compile
232+
from configurations.implementation
223233
into 'libs'
224234
}
225235

example/android/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "29.0.3"
5+
buildToolsVersion = "30.0.2"
66
minSdkVersion = 24
7-
compileSdkVersion = 29
8-
targetSdkVersion = 29
7+
compileSdkVersion = 30
8+
targetSdkVersion = 30
9+
ndkVersion = "21.4.7075529"
910
}
1011
repositories {
1112
google()
12-
jcenter()
13+
mavenCentral()
1314
}
1415
dependencies {
15-
classpath("com.android.tools.build:gradle:4.1.0")
16+
classpath("com.android.tools.build:gradle:4.2.2")
1617

1718
// NOTE: Do not place your application dependencies here; they belong
1819
// in the individual module build.gradle files
@@ -25,6 +26,7 @@ ext {
2526

2627
allprojects {
2728
repositories {
29+
mavenCentral()
2830
mavenLocal()
2931
maven {
3032
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -36,7 +38,6 @@ allprojects {
3638
}
3739

3840
google()
39-
jcenter()
4041
maven { url 'https://www.jitpack.io' }
4142
}
4243
}

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
android.useAndroidX=true
2121
android.enableJetifier=true
22-
FLIPPER_VERSION=0.75.1
22+
FLIPPER_VERSION=0.99.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
//
22
// Use this file to import your target's public headers that you would like to expose to Swift.
33
//
4+

example/ios/CompressorExample.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
1212
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1313
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14-
18866BA2266DFB1A006FF392 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18866BA1266DFB1A006FF392 /* File.swift */; };
14+
182DED0427301375009645C1 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 182DED0327301375009645C1 /* File.swift */; };
1515
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
1616
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1717
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
@@ -48,9 +48,8 @@
4848
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = CompressorExample/Images.xcassets; sourceTree = "<group>"; };
4949
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = CompressorExample/Info.plist; sourceTree = "<group>"; };
5050
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = CompressorExample/main.m; sourceTree = "<group>"; };
51-
1886582C2664AE9D006FF392 /* CompressorExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CompressorExample-Bridging-Header.h"; sourceTree = "<group>"; };
52-
18866BA0266DFB19006FF392 /* CompressorExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CompressorExample-Bridging-Header.h"; sourceTree = "<group>"; };
53-
18866BA1266DFB1A006FF392 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
51+
182DED0227301371009645C1 /* CompressorExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CompressorExample-Bridging-Header.h"; sourceTree = "<group>"; };
52+
182DED0327301375009645C1 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
5453
2D02E47B1E0B4A5D006451C7 /* CompressorExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CompressorExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5554
2D02E4901E0B4A5D006451C7 /* CompressorExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "CompressorExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
5655
47F7ED3B7971BE374F7B8635 /* Pods-CompressorExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CompressorExample.debug.xcconfig"; path = "Target Support Files/Pods-CompressorExample/Pods-CompressorExample.debug.xcconfig"; sourceTree = "<group>"; };
@@ -154,15 +153,14 @@
154153
83CBB9F61A601CBA00E9B192 = {
155154
isa = PBXGroup;
156155
children = (
157-
18866BA1266DFB1A006FF392 /* File.swift */,
156+
182DED0327301375009645C1 /* File.swift */,
158157
13B07FAE1A68108700A75B9A /* CompressorExample */,
159158
832341AE1AAA6A7D00B99B32 /* Libraries */,
160159
00E356EF1AD99517003FC87E /* CompressorExampleTests */,
161160
83CBBA001A601CBA00E9B192 /* Products */,
162161
2D16E6871FA4F8E400B85C8A /* Frameworks */,
163162
6B9684456A2045ADE5A6E47E /* Pods */,
164-
1886582C2664AE9D006FF392 /* CompressorExample-Bridging-Header.h */,
165-
18866BA0266DFB19006FF392 /* CompressorExample-Bridging-Header.h */,
163+
182DED0227301371009645C1 /* CompressorExample-Bridging-Header.h */,
166164
);
167165
indentWidth = 2;
168166
sourceTree = "<group>";
@@ -274,7 +272,7 @@
274272
};
275273
13B07F861A680F5B00A75B9A = {
276274
DevelopmentTeam = 454A869839;
277-
LastSwiftMigration = 1240;
275+
LastSwiftMigration = 1310;
278276
ProvisioningStyle = Manual;
279277
};
280278
2D02E47A1E0B4A5D006451C7 = {
@@ -365,13 +363,15 @@
365363
);
366364
inputPaths = (
367365
"${PODS_ROOT}/Target Support Files/Pods-CompressorExample/Pods-CompressorExample-frameworks.sh",
368-
"${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/iphoneos/hermes.framework",
369-
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
366+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/double-conversion/double-conversion.framework/double-conversion",
367+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL",
368+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes/hermes.framework/hermes",
370369
);
371370
name = "[CP] Embed Pods Frameworks";
372371
outputPaths = (
373-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
372+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework",
374373
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
374+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
375375
);
376376
runOnlyForDeploymentPostprocessing = 0;
377377
shellPath = /bin/sh;
@@ -486,7 +486,7 @@
486486
buildActionMask = 2147483647;
487487
files = (
488488
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
489-
18866BA2266DFB1A006FF392 /* File.swift in Sources */,
489+
182DED0427301375009645C1 /* File.swift in Sources */,
490490
13B07FC11A68108700A75B9A /* main.m in Sources */,
491491
);
492492
runOnlyForDeploymentPostprocessing = 0;

example/ios/File.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// File.swift
33
// CompressorExample
44
//
5-
// Created by Numan on 07/06/2021.
5+
// Created by Numan on 01/11/2021.
66
//
77

88
import Foundation

example/ios/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ target 'CompressorExample' do
2020
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
2121
post_install do |installer|
2222
flipper_post_install(installer)
23+
__apply_Xcode_12_5_M1_post_install_workaround(installer)
2324
end
2425
end

0 commit comments

Comments
 (0)