@encorekit/react-native 1.1.17 → 1.1.19
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 +20 -1
- package/android/settings.gradle +9 -0
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -2,11 +2,30 @@ import groovy.json.JsonSlurper
|
|
|
2
2
|
|
|
3
3
|
def packageJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
|
|
4
4
|
def encoreAndroidVersion = packageJson.sdkVersions.android["com.encorekit:encore"]
|
|
5
|
+
// Read RN version from devDependencies for standalone CI builds.
|
|
6
|
+
// When consumed by a host app, the host's react-android version takes precedence.
|
|
7
|
+
def rnVersion = packageJson.devDependencies["react-native"]?.replaceAll("[^0-9.]", "") ?: "+"
|
|
5
8
|
|
|
6
9
|
buildscript {
|
|
7
10
|
ext.safeExtGet = {prop, fallback ->
|
|
8
11
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
9
12
|
}
|
|
13
|
+
|
|
14
|
+
repositories {
|
|
15
|
+
google()
|
|
16
|
+
mavenCentral()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
dependencies {
|
|
20
|
+
classpath "com.android.tools.build:gradle:8.2.2"
|
|
21
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
repositories {
|
|
26
|
+
google()
|
|
27
|
+
mavenCentral()
|
|
28
|
+
maven { url "https://jitpack.io" }
|
|
10
29
|
}
|
|
11
30
|
|
|
12
31
|
apply plugin: "com.android.library"
|
|
@@ -68,7 +87,7 @@ if (hostKotlinVersion != null) {
|
|
|
68
87
|
|
|
69
88
|
dependencies {
|
|
70
89
|
// Host app provides these
|
|
71
|
-
compileOnly "com.facebook.react:react-android
|
|
90
|
+
compileOnly "com.facebook.react:react-android:${rnVersion}"
|
|
72
91
|
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
73
92
|
|
|
74
93
|
// Bridge uses coroutines for async calls to native SDK
|