margelo / react-native-quick-crypto

⚡️ A fast implementation of Node's `crypto` module written in C/C++ JSI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android build failing: Task :react-native-quick-crypto:extractAARHeaders FAILED

andreaSimonePorceddu opened this issue · comments

Today our Android build starts to fail because of an error on react-native-quick-crypto.

Task :react-native-quick-crypto:extractAARHeaders FAILED

* Where:
Build file ‘*/node_modules/react-native-quick-crypto/android/build.gradle’ line: 337
* What went wrong:
Execution failed for task ‘:react-native-quick-crypto:extractAARHeaders’.
> Could not resolve all files for configuration ‘:react-native-quick-crypto:extractHeaders’.
   > Could not find fbjni-0.5.0-headers.jar (com.facebook.fbjni:fbjni:0.5.0).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni/0.5.0/fbjni-0.5.0-headers.jar

https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni/0.5.0/fbjni-0.5.0-headers.jar

return a 404

react-native-quick-crypto version ^0.5.0
react-native version 0.70.8

It seems to be linked with this issue:
facebookincubator/fbjni#85

We had to go with a patch:

diff --git a/node_modules/react-native-quick-crypto/android/build.gradle b/node_modules/react-native-quick-crypto/android/build.gradle
index 3ec9ff0..61cca86 100644
--- a/node_modules/react-native-quick-crypto/android/build.gradle
+++ b/node_modules/react-native-quick-crypto/android/build.gradle
@@ -172,9 +172,9 @@ dependencies {
   implementation 'com.facebook.react:react-native:+'
 
   //noinspection GradleDynamicVersion
-  extractHeaders("com.facebook.fbjni:fbjni:+:headers")
+  extractHeaders("com.facebook.fbjni:fbjni:0.5.1:headers")
   //noinspection GradleDynamicVersion
-  extractJNI("com.facebook.fbjni:fbjni:+")
+  extractJNI("com.facebook.fbjni:fbjni:0.5.1")
 
   if (!sourceBuild) {
     def buildType = "debug"