@reactvision/react-viro 2.43.5 → 2.43.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VIRO_VERSION = "2.43.
|
|
1
|
+
export const VIRO_VERSION = "2.43.6";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VIRO_VERSION = "2.43.
|
|
1
|
+
export declare const VIRO_VERSION = "2.43.6";
|
|
@@ -31,11 +31,17 @@ const withBranchAndroid = (config) => {
|
|
|
31
31
|
throw new Error("MainApplication.kt or MainApplication.java file not found.");
|
|
32
32
|
}
|
|
33
33
|
fs_1.default.readFile(mainApplicationPath, "utf-8", (err, data) => {
|
|
34
|
+
const packageName = config?.android?.package;
|
|
34
35
|
if (isJava) {
|
|
35
|
-
data = (0, insertLinesHelper_1.insertLinesHelper)("import com.viromedia.bridge.ReactViroPackage;", `package ${
|
|
36
|
+
data = (0, insertLinesHelper_1.insertLinesHelper)("import com.viromedia.bridge.ReactViroPackage;", `package ${packageName};`, data);
|
|
36
37
|
}
|
|
37
38
|
else {
|
|
38
|
-
|
|
39
|
+
// Handle Backticks in package names for Kotlin
|
|
40
|
+
const packageMatch = data.match(/package\s+[\w.`]+/);
|
|
41
|
+
if (!packageMatch) {
|
|
42
|
+
throw new Error("Package declaration not found in MainApplication.kt");
|
|
43
|
+
}
|
|
44
|
+
data = (0, insertLinesHelper_1.insertLinesHelper)("import com.viromedia.bridge.ReactViroPackage", packageMatch[0], data);
|
|
39
45
|
}
|
|
40
46
|
const viroPlugin = config?.plugins?.find((plugin) => Array.isArray(plugin) && plugin[0] === "@reactvision/react-viro");
|
|
41
47
|
if (Array.isArray(viroPlugin)) {
|