@imgly/editor-react-native 1.66.0 → 1.67.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
CHANGED
|
@@ -6,6 +6,16 @@ buildscript {
|
|
|
6
6
|
google()
|
|
7
7
|
gradlePluginPortal()
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
dependencies {
|
|
11
|
+
if (rootProject.ext.has('kotlinVersion')) {
|
|
12
|
+
def kotlinVersion = rootProject.ext.get('kotlinVersion').toString()
|
|
13
|
+
def kotlinMajor = kotlinVersion.tokenize('.')[0].toInteger()
|
|
14
|
+
if (kotlinMajor >= 2) {
|
|
15
|
+
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
9
19
|
}
|
|
10
20
|
|
|
11
21
|
def isNewArchitectureEnabled() {
|
|
@@ -26,12 +36,60 @@ def isKotlin2OrHigher() {
|
|
|
26
36
|
return false
|
|
27
37
|
}
|
|
28
38
|
|
|
29
|
-
def
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return
|
|
39
|
+
def getKotlinCompilerExtensionVersion() {
|
|
40
|
+
// User override takes precedence
|
|
41
|
+
if (gradle.ext.has("kotlinCompilerExtensionVersion")) {
|
|
42
|
+
return gradle.ext.kotlinCompilerExtensionVersion
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
def kotlinVersion = getKotlinVersion()
|
|
46
|
+
if (!kotlinVersion) {
|
|
47
|
+
logger.warn("Could not detect Kotlin version - using Compose Compiler 1.5.10")
|
|
48
|
+
return "1.5.10"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def mainVersion = kotlinVersion.split('-')[0]
|
|
52
|
+
|
|
53
|
+
// Kotlin to Compose Compiler compatibility map (from developer.android.com)
|
|
54
|
+
def compatibilityMap = [
|
|
55
|
+
// Kotlin 1.9.x
|
|
56
|
+
"1.9.25": "1.5.15",
|
|
57
|
+
"1.9.24": "1.5.14",
|
|
58
|
+
"1.9.23": "1.5.13",
|
|
59
|
+
"1.9.22": "1.5.10",
|
|
60
|
+
"1.9.21": "1.5.7",
|
|
61
|
+
"1.9.20": "1.5.5",
|
|
62
|
+
"1.9.10": "1.5.3",
|
|
63
|
+
"1.9.0": "1.5.2",
|
|
64
|
+
// Kotlin 1.8.x
|
|
65
|
+
"1.8.22": "1.4.8",
|
|
66
|
+
"1.8.21": "1.4.7",
|
|
67
|
+
"1.8.20": "1.4.6",
|
|
68
|
+
"1.8.10": "1.4.4",
|
|
69
|
+
"1.8.0": "1.4.1",
|
|
70
|
+
// Kotlin 1.7.x
|
|
71
|
+
"1.7.21": "1.4.0-alpha02",
|
|
72
|
+
"1.7.20": "1.3.2",
|
|
73
|
+
"1.7.10": "1.3.1",
|
|
74
|
+
// Kotlin 1.6.x
|
|
75
|
+
"1.6.21": "1.2.0",
|
|
76
|
+
"1.6.20": "1.2.0-beta03",
|
|
77
|
+
"1.6.10": "1.1.1",
|
|
78
|
+
"1.6.0": "1.1.0-rc02",
|
|
79
|
+
// Kotlin 1.5.x
|
|
80
|
+
"1.5.31": "1.0.5",
|
|
81
|
+
"1.5.30": "1.0.3",
|
|
82
|
+
"1.5.21": "1.0.2",
|
|
83
|
+
"1.5.10": "1.0.0",
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
if (compatibilityMap.containsKey(mainVersion)) {
|
|
87
|
+
return compatibilityMap[mainVersion]
|
|
33
88
|
}
|
|
34
|
-
|
|
89
|
+
|
|
90
|
+
// Fallback for unknown versions
|
|
91
|
+
logger.warn("Unknown Kotlin version '$mainVersion' - using Compose Compiler 1.5.10")
|
|
92
|
+
return "1.5.10"
|
|
35
93
|
}
|
|
36
94
|
|
|
37
95
|
apply plugin: 'com.android.library'
|
|
@@ -71,8 +129,9 @@ android {
|
|
|
71
129
|
}
|
|
72
130
|
|
|
73
131
|
if (!isKotlin2OrHigher()) {
|
|
132
|
+
def composeVersion = getKotlinCompilerExtensionVersion()
|
|
74
133
|
composeOptions {
|
|
75
|
-
kotlinCompilerExtensionVersion =
|
|
134
|
+
kotlinCompilerExtensionVersion = composeVersion
|
|
76
135
|
}
|
|
77
136
|
}
|
|
78
137
|
}
|
|
@@ -83,7 +142,7 @@ repositories {
|
|
|
83
142
|
}
|
|
84
143
|
|
|
85
144
|
dependencies {
|
|
86
|
-
implementation findProject(":editor") ?: "ly.img:editor:1.
|
|
145
|
+
implementation findProject(":editor") ?: "ly.img:editor:1.67.0"
|
|
87
146
|
implementation platform("androidx.compose:compose-bom:2023.05.01")
|
|
88
147
|
implementation "androidx.activity:activity-compose:1.6.1"
|
|
89
148
|
implementation "androidx.activity:activity:1.7.0"
|
|
@@ -32,7 +32,6 @@ import ly.img.editor.reactnative.module.model.EditorPreset
|
|
|
32
32
|
import ly.img.editor.reactnative.module.model.EditorResult
|
|
33
33
|
import ly.img.editor.reactnative.module.model.EditorSettings
|
|
34
34
|
import ly.img.editor.reactnative.module.model.EditorSourceType
|
|
35
|
-
import ly.img.engine.DemoAssetSource
|
|
36
35
|
import ly.img.engine.DesignBlock
|
|
37
36
|
import ly.img.engine.DesignBlockType
|
|
38
37
|
import ly.img.engine.Engine
|
|
@@ -357,12 +356,10 @@ object EditorBuilderDefaults {
|
|
|
357
356
|
).forEach { type ->
|
|
358
357
|
engine.asset.addSource(SystemGalleryAssetSource(context, type))
|
|
359
358
|
}
|
|
360
|
-
val excluded = setOf(DemoAssetSource.IMAGE, DemoAssetSource.VIDEO, DemoAssetSource.AUDIO)
|
|
361
359
|
engine.addDemoAssetSources(
|
|
362
360
|
sceneMode = engine.scene.getMode(),
|
|
363
361
|
withUploadAssetSources = true,
|
|
364
|
-
|
|
365
|
-
baseUri = Uri.parse("https://cdn.img.ly/assets/demo/v2"),
|
|
362
|
+
baseUri = Uri.parse("https://cdn.img.ly/assets/demo/v3"),
|
|
366
363
|
)
|
|
367
364
|
val defaultTypeface = TypefaceProvider().provideTypeface(engine, "Roboto")
|
|
368
365
|
requireNotNull(defaultTypeface)
|
|
@@ -60,7 +60,6 @@ extension OnCreate {
|
|
|
60
60
|
let baseURI = baseURL ?? Engine.assetBaseURL
|
|
61
61
|
try await engine.addDefaultAssetSources(baseURL: baseURI)
|
|
62
62
|
try await engine.addDemoAssetSources(
|
|
63
|
-
exclude: [.image, .video, .audio],
|
|
64
63
|
sceneMode: engine.scene.getMode(),
|
|
65
64
|
withUploadAssetSources: true,
|
|
66
65
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imgly/editor-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.67.0",
|
|
4
4
|
"description": "CreativeEditor SDK for React Native - enable photo, video and design editing for your users on iOS and Android.",
|
|
5
5
|
"react-native": "index.js",
|
|
6
6
|
"source": "index.js",
|