react-native-config 1.5.9 → 1.5.10
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 +18 -0
- package/package.json +1 -1
- package/src/NativeRNCConfig.ts +2 -1
package/android/build.gradle
CHANGED
|
@@ -9,7 +9,14 @@ buildscript {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
def isNewArchitectureEnabled() {
|
|
13
|
+
return project.hasProperty("newArchEnabled") && (project.newArchEnabled == "true" || project.newArchEnabled == true)
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
apply plugin: 'com.android.library'
|
|
17
|
+
if (isNewArchitectureEnabled()) {
|
|
18
|
+
apply plugin: 'com.facebook.react'
|
|
19
|
+
}
|
|
13
20
|
|
|
14
21
|
def safeExtGet(prop, fallback) {
|
|
15
22
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
@@ -44,12 +51,23 @@ android {
|
|
|
44
51
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
45
52
|
versionCode 1
|
|
46
53
|
versionName "1.0"
|
|
54
|
+
|
|
55
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
56
|
+
|
|
57
|
+
ndk {
|
|
58
|
+
abiFilters(*reactNativeArchitectures())
|
|
59
|
+
}
|
|
47
60
|
}
|
|
48
61
|
lintOptions {
|
|
49
62
|
abortOnError false
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
65
|
|
|
66
|
+
def reactNativeArchitectures() {
|
|
67
|
+
def value = project.getProperties().get("reactNativeArchitectures")
|
|
68
|
+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
69
|
+
}
|
|
70
|
+
|
|
53
71
|
repositories {
|
|
54
72
|
mavenCentral()
|
|
55
73
|
}
|
package/package.json
CHANGED
package/src/NativeRNCConfig.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { TurboModuleRegistry } from 'react-native';
|
|
|
4
4
|
export interface Spec extends TurboModule {
|
|
5
5
|
// Synchronous getters (supported on Windows TurboModules)
|
|
6
6
|
getAll(): { [key: string]: string };
|
|
7
|
-
|
|
7
|
+
// it's overriding react-native method, so we're not using it
|
|
8
|
+
// get(key: string): string;
|
|
8
9
|
// Optional Composition info hook
|
|
9
10
|
compositionInfo?(): string;
|
|
10
11
|
}
|