react-native-fast-image 8.18.0 → 8.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -15
- package/android/build.gradle +3 -0
- package/android/consumer-rules.pro +43 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -91,21 +91,6 @@ const YourImage = () => (
|
|
|
91
91
|
|
|
92
92
|
- [Are you using Glide already using an AppGlideModule?](docs/app-glide-module.md) (you might have problems if you don't read this)
|
|
93
93
|
|
|
94
|
-
## Are you using Proguard?
|
|
95
|
-
|
|
96
|
-
If you use Proguard you will need to add these lines to `android/app/proguard-rules.pro`:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
-keep public class com.dylanvann.fastimage.* {*;}
|
|
100
|
-
-keep public class com.dylanvann.fastimage.** {*;}
|
|
101
|
-
-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
102
|
-
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
|
103
|
-
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
|
104
|
-
**[] $VALUES;
|
|
105
|
-
public *;
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
94
|
## Properties
|
|
110
95
|
|
|
111
96
|
### `source?: object`
|
package/android/build.gradle
CHANGED
|
@@ -35,6 +35,8 @@ android {
|
|
|
35
35
|
targetSdkVersion safeExtGet('targetSdkVersion', 28)
|
|
36
36
|
versionCode 1
|
|
37
37
|
versionName "1.0"
|
|
38
|
+
// Applied to the app's release build, so apps don't need to add them.
|
|
39
|
+
consumerProguardFiles 'consumer-rules.pro'
|
|
38
40
|
}
|
|
39
41
|
sourceSets {
|
|
40
42
|
main {
|
|
@@ -68,6 +70,7 @@ repositories {
|
|
|
68
70
|
mavenCentral()
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
// When changing the default, revisit the Glide rules in consumer-rules.pro.
|
|
71
74
|
def glideVersion = safeExtGet('glideVersion', '4.12.0')
|
|
72
75
|
|
|
73
76
|
dependencies {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# ProGuard/R8 rules for apps that use FastImage: the Android Gradle plugin
|
|
2
|
+
# applies them to the app's release build (consumerProguardFiles in
|
|
3
|
+
# build.gradle), so apps don't need to copy them.
|
|
4
|
+
|
|
5
|
+
# FastImage's classes: its view manager, native module, Glide modules and
|
|
6
|
+
# events.
|
|
7
|
+
-keep public class com.dylanvann.fastimage.* {*;}
|
|
8
|
+
-keep public class com.dylanvann.fastimage.** {*;}
|
|
9
|
+
|
|
10
|
+
# The Glide rules below cover what Glide's own rules (its library's
|
|
11
|
+
# proguard-rules.txt) didn't at the version FastImage uses by default
|
|
12
|
+
# (glideVersion in build.gradle, 4.12.0) and older ones apps may pick. When
|
|
13
|
+
# updating Glide, revisit which are still needed: whether Glide's rules now
|
|
14
|
+
# keep modules' constructors, and whether its integrations still register
|
|
15
|
+
# old-style modules in their manifests (the OkHttp integration's
|
|
16
|
+
# OkHttpGlideModule still did in 5.0.9).
|
|
17
|
+
|
|
18
|
+
# Glide's modules and their constructors: FastImage's, the one Glide
|
|
19
|
+
# generates from them, and old-style modules Glide finds in the app's manifest
|
|
20
|
+
# and creates by reflection (e.g. its OkHttp integration's OkHttpGlideModule,
|
|
21
|
+
# which FastImage uses). R8's full mode (the default from the Android Gradle
|
|
22
|
+
# plugin 8.0) removes a constructor a rule doesn't name, and Glide then
|
|
23
|
+
# crashes when it starts ("Unable to instantiate GlideModule implementation").
|
|
24
|
+
-keep public class * implements com.bumptech.glide.module.GlideModule {
|
|
25
|
+
<init>();
|
|
26
|
+
}
|
|
27
|
+
-keep public class * extends com.bumptech.glide.module.AppGlideModule {
|
|
28
|
+
<init>(...);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
# Glide's image header types.
|
|
32
|
+
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
|
33
|
+
**[] $VALUES;
|
|
34
|
+
public *;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# React Native's event dispatcher, which FastImage looks up by name
|
|
38
|
+
# (FastImageEvents), so it still compiles against React Native 0.60-0.62,
|
|
39
|
+
# which don't have it. R8 would rename it, and on the New Architecture every
|
|
40
|
+
# event (onLoad, onError, ...) would then be dropped.
|
|
41
|
+
-keep class com.facebook.react.uimanager.UIManagerHelper {
|
|
42
|
+
public static *** getEventDispatcherForReactTag(com.facebook.react.bridge.ReactContext, int);
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-fast-image",
|
|
3
|
-
"version": "8.18.
|
|
3
|
+
"version": "8.18.2",
|
|
4
4
|
"description": "🚩 FastImage, performant React Native image component.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cache",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"typings": "dist/index.d.ts",
|
|
25
25
|
"files": [
|
|
26
26
|
"android/build.gradle",
|
|
27
|
+
"android/consumer-rules.pro",
|
|
27
28
|
"android/src/main",
|
|
28
29
|
"ios/FastImage",
|
|
29
30
|
"ios/FastImage.xcodeproj/project.pbxproj",
|