Open jakubgs opened 2 years ago
Running this before build fixes the issue:
sed -i '65 i implementation "com.github.bumptech.glide:annotations:${glideVersion}"' node_modules/react-native-fast-image/android/build.gradle
But that's hardly a proper fix.
Right now the dependencies
section of android/build.gradle
looks like this:
https://github.com/DylanVann/react-native-fast-image/blob/4d8c74945df460bd89ad2bb74c86efb6ccf76c48/android/build.gradle#L62-L68
https://github.com/DylanVann/react-native-fast-image/blob/v8.5.11/android/build.gradle#L62-L68
Before it looked like this: https://github.com/DylanVann/react-native-fast-image/blob/df37c4f7b2b376d5bc8cfd92a5ae20cef091e17e/android/build.gradle#L59-L70 https://github.com/DylanVann/react-native-fast-image/blob/v8.5.0/android/build.gradle#L59-L70
As we can see an explicit reference to com.github.bumptech.glide:annotations
has been dropped in: https://github.com/DylanVann/react-native-fast-image/commit/1f04c5542c6138d58446c58c3f3a5614772f81f1
As expected, downgrading to 8.5.0
fixes the build issue. So as far as I can tell the removal of the:
implementation("com.github.bumptech.glide:annotations:${_glideVersion}")
line has broken builds for FastImageOkHttpProgressGlideModule.java
We're trying to use react-native-fast-image in https://github.com/status-im/status-react/pull/12769 and I've identified a very weird build issue.
Our compilation using Gradle
5.6.4
fails with:And by running Gradle with
--debug
I've found out that thejavac
flags were incorrect. Specifically:In this example we can see that:
-processorpath
includes the path toannotations-4.12.0.jar
-classpath
does not include the path toannotations-4.12.0.jar
If I run the command manually but add the JAR path to
-classpath
compilation works. For some reason Gradle understands thatannotations
is a dependency oncompiler
, but misses that it's a dependency onglide
.