From 1b61196c1a5e2f05da533b6035c6663d0129bbc5 Mon Sep 17 00:00:00 2001 From: Krzysztof Piaskowy Date: Fri, 19 Aug 2022 15:07:04 +0200 Subject: [PATCH] Release 2.10.0 (#3475) * Update version in package.json * androidx backward compatibility * Gradle backward compatibility --- android/build.gradle | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b8003de4b71..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) @@ -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)