Skip to content

Commit

Permalink
fix: removelistener for react-native>=65.0 break changes
Browse files Browse the repository at this point in the history
  • Loading branch information
numandev1 committed Nov 1, 2021
1 parent 59b2caf commit dcb23b0
Show file tree
Hide file tree
Showing 21 changed files with 2,444 additions and 2,248 deletions.
7 changes: 3 additions & 4 deletions .flowconfig
Expand Up @@ -23,11 +23,10 @@ node_modules/react-native/flow/
[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

exact_by_default=true

format.bracket_spacing=false

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
Expand Down Expand Up @@ -63,4 +62,4 @@ untyped-import
untyped-type-import

[version]
^0.137.0
^0.158.0
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -28,6 +28,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
*.hprof

# Android/IJ
#
Expand Down
2 changes: 1 addition & 1 deletion 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.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 11 additions & 1 deletion example/android/app/build.gradle
Expand Up @@ -119,6 +119,11 @@ 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 {
compileSdkVersion rootProject.ext.compileSdkVersion

Expand Down Expand Up @@ -153,6 +158,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.
Expand Down Expand Up @@ -219,7 +229,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'
}

Expand Down
13 changes: 7 additions & 6 deletions example/android/build.gradle
Expand Up @@ -2,17 +2,18 @@

buildscript {
ext {
buildToolsVersion = "29.0.3"
buildToolsVersion = "30.0.2"
minSdkVersion = 24
compileSdkVersion = 29
targetSdkVersion = 29
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("com.android.tools.build:gradle:4.2.2")

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

allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand All @@ -36,7 +38,6 @@ allprojects {
}

google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Expand Up @@ -19,4 +19,4 @@

android.useAndroidX=true
android.enableJetifier=true
FLIPPER_VERSION=0.75.1
FLIPPER_VERSION=0.99.0
1 change: 1 addition & 0 deletions example/ios/CompressorExample-Bridging-Header.h
@@ -1,3 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

24 changes: 12 additions & 12 deletions example/ios/CompressorExample.xcodeproj/project.pbxproj
Expand Up @@ -11,7 +11,7 @@
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
18866BA2266DFB1A006FF392 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18866BA1266DFB1A006FF392 /* File.swift */; };
182DED0427301375009645C1 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 182DED0327301375009645C1 /* File.swift */; };
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
Expand Down Expand Up @@ -48,9 +48,8 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = CompressorExample/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = CompressorExample/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = CompressorExample/main.m; sourceTree = "<group>"; };
1886582C2664AE9D006FF392 /* CompressorExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CompressorExample-Bridging-Header.h"; sourceTree = "<group>"; };
18866BA0266DFB19006FF392 /* CompressorExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CompressorExample-Bridging-Header.h"; sourceTree = "<group>"; };
18866BA1266DFB1A006FF392 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
182DED0227301371009645C1 /* CompressorExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CompressorExample-Bridging-Header.h"; sourceTree = "<group>"; };
182DED0327301375009645C1 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
2D02E47B1E0B4A5D006451C7 /* CompressorExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CompressorExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* CompressorExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "CompressorExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
Expand Down Expand Up @@ -154,15 +153,14 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
18866BA1266DFB1A006FF392 /* File.swift */,
182DED0327301375009645C1 /* File.swift */,
13B07FAE1A68108700A75B9A /* CompressorExample */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* CompressorExampleTests */,
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
6B9684456A2045ADE5A6E47E /* Pods */,
1886582C2664AE9D006FF392 /* CompressorExample-Bridging-Header.h */,
18866BA0266DFB19006FF392 /* CompressorExample-Bridging-Header.h */,
182DED0227301371009645C1 /* CompressorExample-Bridging-Header.h */,
);
indentWidth = 2;
sourceTree = "<group>";
Expand Down Expand Up @@ -274,7 +272,7 @@
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 454A869839;
LastSwiftMigration = 1240;
LastSwiftMigration = 1310;
ProvisioningStyle = Manual;
};
2D02E47A1E0B4A5D006451C7 = {
Expand Down Expand Up @@ -365,13 +363,15 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-CompressorExample/Pods-CompressorExample-frameworks.sh",
"${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/iphoneos/hermes.framework",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/double-conversion/double-conversion.framework/double-conversion",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL/OpenSSL.framework/OpenSSL",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -486,7 +486,7 @@
buildActionMask = 2147483647;
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
18866BA2266DFB1A006FF392 /* File.swift in Sources */,
182DED0427301375009645C1 /* File.swift in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/File.swift
Expand Up @@ -2,7 +2,7 @@
// File.swift
// CompressorExample
//
// Created by Numan on 07/06/2021.
// Created by Numan on 01/11/2021.
//

import Foundation
1 change: 1 addition & 0 deletions example/ios/Podfile
Expand Up @@ -20,5 +20,6 @@ target 'CompressorExample' do
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
post_install do |installer|
flipper_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end

0 comments on commit dcb23b0

Please sign in to comment.