@imgly/camera-react-native 1.47.0 → 1.49.0
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/android/build.gradle +31 -7
- package/ios/IMGLYCameraModule.mm +2 -6
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -6,16 +6,38 @@ buildscript {
|
|
|
6
6
|
google()
|
|
7
7
|
gradlePluginPortal()
|
|
8
8
|
}
|
|
9
|
-
dependencies {
|
|
10
|
-
classpath("com.android.tools.build:gradle:7.3.1")
|
|
11
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.22")
|
|
12
|
-
}
|
|
13
9
|
}
|
|
14
10
|
|
|
15
11
|
def isNewArchitectureEnabled() {
|
|
16
12
|
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
17
13
|
}
|
|
18
14
|
|
|
15
|
+
def getKotlinVersion() {
|
|
16
|
+
return project.plugins.findPlugin("kotlin-android")?.class?.package?.implementationVersion
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
def isKotlin2OrHigher() {
|
|
20
|
+
def kotlinVersion = getKotlinVersion()
|
|
21
|
+
if (kotlinVersion) {
|
|
22
|
+
def mainVersion = kotlinVersion.split('-')[0]
|
|
23
|
+
def versionParts = mainVersion.tokenize('.').collect { it.toInteger() }
|
|
24
|
+
return versionParts[0] >= 2
|
|
25
|
+
}
|
|
26
|
+
return false
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def getComposeVersion() {
|
|
30
|
+
if (isKotlin2OrHigher()) {
|
|
31
|
+
def mainVersion = getKotlinVersion().split('-')[0]
|
|
32
|
+
return mainVersion
|
|
33
|
+
}
|
|
34
|
+
return gradle.ext.has("kotlinCompilerExtensionVersion") ? gradle.ext.kotlinCompilerExtensionVersion : "1.5.10"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (isKotlin2OrHigher()) {
|
|
38
|
+
project.plugins.apply('org.jetbrains.kotlin.plugin.compose')
|
|
39
|
+
}
|
|
40
|
+
|
|
19
41
|
apply plugin: 'com.android.library'
|
|
20
42
|
apply plugin: 'com.facebook.react'
|
|
21
43
|
apply plugin: 'org.jetbrains.kotlin.android'
|
|
@@ -43,8 +65,10 @@ android {
|
|
|
43
65
|
compose true
|
|
44
66
|
}
|
|
45
67
|
|
|
46
|
-
|
|
47
|
-
|
|
68
|
+
if (!isKotlin2OrHigher()) {
|
|
69
|
+
composeOptions {
|
|
70
|
+
kotlinCompilerExtensionVersion = getComposeVersion()
|
|
71
|
+
}
|
|
48
72
|
}
|
|
49
73
|
}
|
|
50
74
|
|
|
@@ -54,7 +78,7 @@ repositories {
|
|
|
54
78
|
}
|
|
55
79
|
|
|
56
80
|
dependencies {
|
|
57
|
-
implementation findProject(":camera") ?: "ly.img:camera:1.
|
|
81
|
+
implementation findProject(":camera") ?: "ly.img:camera:1.49.0"
|
|
58
82
|
implementation platform("androidx.compose:compose-bom:2023.05.01")
|
|
59
83
|
implementation "androidx.activity:activity-compose:1.6.1"
|
|
60
84
|
implementation "androidx.activity:activity:1.7.0"
|
package/ios/IMGLYCameraModule.mm
CHANGED
|
@@ -26,12 +26,8 @@ RCT_EXPORT_MODULE(IMGLYCamera)
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
#else
|
|
29
|
-
RCT_EXPORT_METHOD(openCamera
|
|
30
|
-
|
|
31
|
-
: (nullable NSString*)video metadata
|
|
32
|
-
: (NSDictionary*)metadata resolve
|
|
33
|
-
: (RCTPromiseResolveBlock)resolve reject
|
|
34
|
-
: (RCTPromiseRejectBlock)reject) {
|
|
29
|
+
RCT_EXPORT_METHOD(openCamera : (nonnull NSDictionary*)settings video : (nullable NSString*)video metadata : (
|
|
30
|
+
NSDictionary*)metadata resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject) {
|
|
35
31
|
[self open:settings video:video metadata:metadata resolve:resolve reject:reject];
|
|
36
32
|
}
|
|
37
33
|
#endif
|
package/package.json
CHANGED