expo-image-loader 2.2.0 → 3.1.1
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/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/android/build.gradle +17 -28
- package/android/src/main/java/expo/modules/imageloader/ImageLoaderModule.kt +15 -9
- package/android/src/main/java/expo/modules/imageloader/ImageLoaderPackage.kt +2 -2
- package/ios/EXImageLoader/EXImageLoader.h +2 -2
- package/ios/EXImageLoader/EXImageLoader.m +2 -1
- package/ios/EXImageLoader.podspec +2 -2
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,30 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 3.1.1 — 2022-02-01
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
## 3.1.0 — 2021-12-03
|
|
20
|
+
|
|
21
|
+
_This version does not introduce any user-facing changes._
|
|
22
|
+
|
|
23
|
+
## 3.0.0 — 2021-09-28
|
|
24
|
+
|
|
25
|
+
### 🛠 Breaking changes
|
|
26
|
+
|
|
27
|
+
- Dropped support for iOS 11.0 ([#14383](https://github.com/expo/expo/pull/14383) by [@cruzach](https://github.com/cruzach))
|
|
28
|
+
|
|
29
|
+
### 🐛 Bug fixes
|
|
30
|
+
|
|
31
|
+
- Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))
|
|
32
|
+
|
|
33
|
+
## 2.3.0-alpha.0 — 2021-08-17
|
|
34
|
+
|
|
35
|
+
_This version does not introduce any user-facing changes._
|
|
36
|
+
|
|
13
37
|
## 2.2.0 — 2021-06-16
|
|
14
38
|
|
|
15
39
|
### 🐛 Bug fixes
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ For [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/
|
|
|
8
8
|
|
|
9
9
|
# Installation in bare React Native projects
|
|
10
10
|
|
|
11
|
-
For bare React Native projects, you must ensure that you have [installed and configured the `
|
|
11
|
+
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
|
|
12
12
|
|
|
13
13
|
### Add the package to your npm dependencies
|
|
14
14
|
|
package/android/build.gradle
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
apply plugin: 'kotlin-android'
|
|
3
|
-
apply plugin: 'maven'
|
|
3
|
+
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
buildscript {
|
|
6
6
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
@@ -18,12 +18,7 @@ buildscript {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
group = 'host.exp.exponent'
|
|
21
|
-
version = '
|
|
22
|
-
|
|
23
|
-
// Upload android library to maven with javadoc and android sources
|
|
24
|
-
configurations {
|
|
25
|
-
deployerJars
|
|
26
|
-
}
|
|
21
|
+
version = '3.1.1'
|
|
27
22
|
|
|
28
23
|
// Creating sources with comments
|
|
29
24
|
task androidSourcesJar(type: Jar) {
|
|
@@ -31,16 +26,19 @@ task androidSourcesJar(type: Jar) {
|
|
|
31
26
|
from android.sourceSets.main.java.srcDirs
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
afterEvaluate {
|
|
30
|
+
publishing {
|
|
31
|
+
publications {
|
|
32
|
+
release(MavenPublication) {
|
|
33
|
+
from components.release
|
|
34
|
+
// Add additional sourcesJar to artifacts
|
|
35
|
+
artifact(androidSourcesJar)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
repositories {
|
|
39
|
+
maven {
|
|
40
|
+
url = mavenLocal().url
|
|
41
|
+
}
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
}
|
|
@@ -57,7 +55,7 @@ android {
|
|
|
57
55
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
58
56
|
targetSdkVersion safeExtGet("targetSdkVersion", 30)
|
|
59
57
|
versionCode 8
|
|
60
|
-
versionName "
|
|
58
|
+
versionName "3.1.1"
|
|
61
59
|
}
|
|
62
60
|
lintOptions {
|
|
63
61
|
abortOnError false
|
|
@@ -68,17 +66,8 @@ repositories {
|
|
|
68
66
|
mavenCentral()
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
if (new File(rootProject.projectDir.parentFile, 'package.json').exists()) {
|
|
72
|
-
apply from: project(":unimodules-core").file("../unimodules-core.gradle")
|
|
73
|
-
} else {
|
|
74
|
-
throw new GradleException(
|
|
75
|
-
'\'unimodules-core.gradle\' was not found in the usual React Native dependency location. ' +
|
|
76
|
-
'This package can only be used in such projects. Are you sure you\'ve installed the dependencies properly?')
|
|
77
|
-
}
|
|
78
|
-
|
|
79
69
|
dependencies {
|
|
80
|
-
|
|
81
|
-
unimodule 'expo-modules-core'
|
|
70
|
+
implementation project(':expo-modules-core')
|
|
82
71
|
|
|
83
72
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
|
|
84
73
|
api 'com.github.bumptech.glide:glide:4.9.0'
|
|
@@ -17,7 +17,7 @@ import com.facebook.imagepipeline.datasource.BaseBitmapDataSubscriber
|
|
|
17
17
|
import com.facebook.imagepipeline.image.CloseableImage
|
|
18
18
|
import com.facebook.imagepipeline.request.ImageRequest
|
|
19
19
|
import expo.modules.interfaces.imageloader.ImageLoaderInterface
|
|
20
|
-
import
|
|
20
|
+
import expo.modules.core.interfaces.InternalModule
|
|
21
21
|
import java.util.concurrent.ExecutionException
|
|
22
22
|
import java.util.concurrent.Future
|
|
23
23
|
|
|
@@ -29,11 +29,14 @@ class ImageLoaderModule(val context: Context) : InternalModule, ImageLoaderInter
|
|
|
29
29
|
|
|
30
30
|
override fun loadImageForDisplayFromURL(url: String): Future<Bitmap> {
|
|
31
31
|
val future = SimpleSettableFuture<Bitmap>()
|
|
32
|
-
loadImageForDisplayFromURL(
|
|
33
|
-
|
|
32
|
+
loadImageForDisplayFromURL(
|
|
33
|
+
url,
|
|
34
|
+
object : ImageLoaderInterface.ResultListener {
|
|
35
|
+
override fun onSuccess(bitmap: Bitmap) = future.set(bitmap)
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
override fun onFailure(@Nullable cause: Throwable?) = future.setException(ExecutionException(cause))
|
|
38
|
+
}
|
|
39
|
+
)
|
|
37
40
|
return future
|
|
38
41
|
}
|
|
39
42
|
|
|
@@ -63,11 +66,14 @@ class ImageLoaderModule(val context: Context) : InternalModule, ImageLoaderInter
|
|
|
63
66
|
|
|
64
67
|
override fun loadImageForManipulationFromURL(@NonNull url: String): Future<Bitmap> {
|
|
65
68
|
val future = SimpleSettableFuture<Bitmap>()
|
|
66
|
-
loadImageForManipulationFromURL(
|
|
67
|
-
|
|
69
|
+
loadImageForManipulationFromURL(
|
|
70
|
+
url,
|
|
71
|
+
object : ImageLoaderInterface.ResultListener {
|
|
72
|
+
override fun onSuccess(bitmap: Bitmap) = future.set(bitmap)
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
override fun onFailure(@NonNull cause: Throwable?) = future.setException(ExecutionException(cause))
|
|
75
|
+
}
|
|
76
|
+
)
|
|
71
77
|
return future
|
|
72
78
|
}
|
|
73
79
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
package expo.modules.imageloader
|
|
2
2
|
|
|
3
3
|
import android.content.Context
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import expo.modules.core.BasePackage
|
|
5
|
+
import expo.modules.core.interfaces.InternalModule
|
|
6
6
|
|
|
7
7
|
class ImageLoaderPackage : BasePackage() {
|
|
8
8
|
override fun createInternalModules(context: Context): List<InternalModule> = listOf(ImageLoaderModule(context))
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Copyright 2019-present 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
|
-
#import <
|
|
3
|
+
#import <ExpoModulesCore/EXInternalModule.h>
|
|
4
4
|
#import <ExpoModulesCore/EXImageLoaderInterface.h>
|
|
5
5
|
#import <React/RCTBridgeModule.h>
|
|
6
6
|
#import <UIKit/UIKit.h>
|
|
7
7
|
|
|
8
|
-
@interface EXImageLoader : NSObject <RCTBridgeModule,
|
|
8
|
+
@interface EXImageLoader : NSObject <RCTBridgeModule, EXInternalModule, EXImageLoaderInterface>
|
|
9
9
|
|
|
10
10
|
@end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#import <EXImageLoader/EXImageLoader.h>
|
|
4
4
|
#import <React/RCTImageLoaderProtocol.h>
|
|
5
|
+
#import <ExpoModulesCore/EXUtilities.h>
|
|
5
6
|
|
|
6
7
|
@interface EXImageLoader ()
|
|
7
8
|
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
|
|
12
13
|
@implementation EXImageLoader
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
EX_REGISTER_MODULE();
|
|
15
16
|
|
|
16
17
|
+ (NSString *)moduleName
|
|
17
18
|
{
|
|
@@ -10,11 +10,11 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platform = :ios, '
|
|
13
|
+
s.platform = :ios, '12.0'
|
|
14
14
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
15
|
+
s.static_framework = true
|
|
15
16
|
|
|
16
17
|
s.dependency 'React-Core'
|
|
17
|
-
s.dependency 'UMCore'
|
|
18
18
|
s.dependency 'ExpoModulesCore'
|
|
19
19
|
|
|
20
20
|
if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-image-loader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Image loader",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -19,5 +19,10 @@
|
|
|
19
19
|
"author": "650 Industries, Inc.",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/expo/expo/tree/master/packages/expo-image-loader",
|
|
22
|
-
"
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"devDependencies": {},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"expo": "*"
|
|
26
|
+
},
|
|
27
|
+
"gitHead": "ba24eba18bf4f4d4b0d54828992d81a2bb18246a"
|
|
23
28
|
}
|