From c72a8aa446c71d6be5c93c40287f567e6b6457b9 Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Sat, 13 Aug 2022 18:32:23 +0200 Subject: [PATCH 1/3] Update version in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3030c366e07..69dde416ed5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-reanimated", - "version": "2.9.1", + "version": "2.10.0", "description": "More powerful alternative to Animated library for React Native.", "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", From 060692366e02fb0ef461faa563542030b02562c4 Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Fri, 19 Aug 2022 15:03:54 +0200 Subject: [PATCH 2/3] androidx backward compatibility --- android/build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index b8003de4b71..66371a9ed4f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -656,7 +656,12 @@ dependencies { } implementation "com.facebook.react:react-native:+" // From node_modules implementation "androidx.transition:transition:1.1.0" - implementation "androidx.core:core:1.7.0" + if (rnMinorVersion > 66) { + implementation "androidx.core:core:1.7.0" + } + else { + implementation "androidx.core:core:1.6.0" + } extractHeaders("com.facebook.fbjni:fbjni:" + FBJNI_VERSION + ":headers") extractSO("com.facebook.fbjni:fbjni:" + FBJNI_VERSION) From eef90a46287b805df25c7b5084a34c8990ee0174 Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Fri, 19 Aug 2022 15:05:08 +0200 Subject: [PATCH 3/3] Gradle backward compatibility --- android/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 66371a9ed4f..6b5e3fc5a40 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -113,18 +113,18 @@ boolean CLIENT_SIDE_BUILD = resolveClientSideBuild() if (CLIENT_SIDE_BUILD) { configurations.maybeCreate("default") - Stream pathStream = Files.find( + List paths = Files.find( Paths.get(rootDir.parent), Integer.MAX_VALUE, - (path, basicFileAttributes) -> { path.toString().endsWith("/react-native-reanimated/package.json") } - ) + {path, fileAttributes -> path.toString().endsWith("/react-native-reanimated/package.json") } + ).toArray() String parsedLocation = "" def libInstancesCount = 0 - pathStream.forEach(path -> { + for (def path in paths) { parsedLocation += "- " + path.toString().replace("/package.json", "\n") libInstancesCount++ - }) + } if (libInstancesCount > 1) { String exceptionMessage = "\nMultiple versions of Reanimated were detected. Only one instance of react-native-reanimated can be installed in a project. You need to resolve the conflict manually. Check out the documentation: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/troubleshooting#multiple-versions-of-reanimated-were-detected \n\nConflict between: \n" + parsedLocation + "\n"; throw new Exception(exceptionMessage)