Skip to content

@atlj/diff commentor #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 143 commits into
base: main
Choose a base branch
from
Open

@atlj/diff commentor #4

wants to merge 143 commits into from

Conversation

atlj
Copy link
Owner

@atlj atlj commented Oct 7, 2023

just testing. plz ignore

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

This PR changes the output of create-react-native-library. You can find the diff of the change here

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

This PR changes the output of create-react-native-library. You can find the diff of the changes below:
https://github.com/atlj/diff-view/compare/1fb0aca..92eba43

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

🤓☝️ This PR changes the output of create-react-native-library. You can find the diff of the changes below:
Java and Objective C - Native module

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

🤓☝️ This PR changes the output of create-react-native-library. You can find the diff of the changes below:

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of affected templates below:

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

module-legacy/java-objc diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java index 4cfa026..65568cc 100644 --- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java +++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java @@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.module.annotations.ReactModule;

+// Hi mom! Is this thing on?
@ReactModule(name = ReactNativeTestModule.NAME)
public class ReactNativeTestModule extends ReactContextBaseJavaModule {
public static final String NAME = "ReactNativeTest";

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.module.annotations.ReactModule;

+// Hi mom! Is this thing on?
@ReactModule(name = ReactNativeTestModule.NAME)
public class ReactNativeTestModule extends ReactContextBaseJavaModule {
public static final String NAME = "ReactNativeTest";
diff --git a/package.json b/package.json
index 8a867e6..c3c0477 100644
--- a/package.json
+++ b/package.json
@@ -65,7 +65,7 @@
"prettier": "^2.0.5",
"react": "17.0.2",
"react-native": "0.70.0",

  • "react-native-builder-bob": "^0.23.1",
  • "react-native-builder-bob": "^0.20.0",
    "release-it": "^15.0.0",
    "typescript": "^5.0.2"
    },

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.module.annotations.ReactModule;

+// Hi mom! Is this thing on?
@ReactModule(name = ReactNativeTestModule.NAME)
public class ReactNativeTestModule extends ReactContextBaseJavaModule {
public static final String NAME = "ReactNativeTest";

@github-actions
Copy link

github-actions bot commented Oct 14, 2023

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

Native module Java and Objective C ```diff module-legacy java-objc diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java index 4cfa026..65568cc 100644 --- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java +++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java @@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.module.annotations.ReactModule;

+// Hi mom! Is this thing on?
@ReactModule(name = ReactNativeTestModule.NAME)
public class ReactNativeTestModule extends ReactContextBaseJavaModule {
public static final String NAME = "ReactNativeTest";

module-legacy java-swift
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.module.annotations.ReactModule;

+// Hi mom! Is this thing on?
@ReactModule(name = ReactNativeTestModule.NAME)
public class ReactNativeTestModule extends ReactContextBaseJavaModule {
public static final String NAME = "ReactNativeTest";

```
</details>

@github-actions
Copy link

github-actions bot commented Oct 14, 2023

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

test
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java 
b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

Native module Java and Objective C
module-legacy java-objc
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";
diff --git a/package.json b/package.json
index 8a867e6..c3c0477 100644
--- a/package.json
+++ b/package.json
@@ -65,7 +65,7 @@
     "prettier": "^2.0.5",
     "react": "17.0.2",
     "react-native": "0.70.0",
-    "react-native-builder-bob": "^0.23.1",
+    "react-native-builder-bob": "^0.20.0",
     "release-it": "^15.0.0",
     "typescript": "^5.0.2"
   },
 
module-legacy java-swift
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";
 

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

Native module Java and Objective C.txt
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";

,

Native module Java and Swift.txt

diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

Native module Java and Objective C
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";
Native module Java and Swift
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";

@github-actions
Copy link

github-actions bot commented Oct 14, 2023

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

Java and Objective C Native module
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";
Java and Swift Native module
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of effected templates below:

Java and Objective C Native module
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";
Java and Swift Native module
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
index 4cfa026..65568cc 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestModule.java
@@ -8,6 +8,7 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
 import com.facebook.react.bridge.ReactMethod;
 import com.facebook.react.module.annotations.ReactModule;
 
+// Hi mom! Is this thing on?
 @ReactModule(name = ReactNativeTestModule.NAME)
 public class ReactNativeTestModule extends ReactContextBaseJavaModule {
   public static final String NAME = "ReactNativeTest";

@atlj atlj force-pushed the @atlj/diff-commentor branch from 59ac7a1 to 3d58cf5 Compare October 19, 2023 14:07
@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of affected templates below:

Java and Objective C Native module
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Swift Native module
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Objective C Native module
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Swift Native module
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Objective C Turbo module with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 6e85436..e55502d 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Objective C Turbo module with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 702d817..81f1652 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Objective C Turbo module
diff --git a/android/build.gradle b/android/build.gradle
index ef3a4fb..89a4959 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Objective C Turbo module
diff --git a/android/build.gradle b/android/build.gradle
index a5f9e58..f46d668 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Objective C Native view
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Swift Native view
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Objective C Native view
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Swift Native view
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Objective C Fabric view with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 37019b9..d6526ac 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,31 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -58,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -76,42 +47,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -164,7 +106,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/newarch/ReactNativeTestViewManagerSpec.java b/android/src/newarch/ReactNativeTestViewManagerSpec.java
index 62dea01..ca429b2 100644
--- a/android/src/newarch/ReactNativeTestViewManagerSpec.java
+++ b/android/src/newarch/ReactNativeTestViewManagerSpec.java
@@ -8,15 +8,8 @@ import com.facebook.react.uimanager.SimpleViewManager;
 import com.facebook.react.uimanager.ViewManagerDelegate;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface;
-import com.facebook.soloader.SoLoader;
 
 public abstract class ReactNativeTestViewManagerSpec<T extends View> extends SimpleViewManager<T> implements ReactNativeTestViewManagerInterface<T> {
-  static {
-    if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-      SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION);
-    }
-  }
-
   private final ViewManagerDelegate<T> mDelegate;
 
   public ReactNativeTestViewManagerSpec() {
Kotlin and Objective C Fabric view with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 021b500..0f5864e 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,31 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -64,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -82,42 +53,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -172,7 +114,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/newarch/ReactNativeTestViewManagerSpec.kt b/android/src/newarch/ReactNativeTestViewManagerSpec.kt
index 676406a..a940078 100644
--- a/android/src/newarch/ReactNativeTestViewManagerSpec.kt
+++ b/android/src/newarch/ReactNativeTestViewManagerSpec.kt
@@ -7,7 +7,6 @@ import com.facebook.react.uimanager.SimpleViewManager
 import com.facebook.react.uimanager.ViewManagerDelegate
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface
-import com.facebook.soloader.SoLoader
 
 abstract class ReactNativeTestViewManagerSpec<T : View> : SimpleViewManager<T>(), ReactNativeTestViewManagerInterface<T> {
   private val mDelegate: ViewManagerDelegate<T>
@@ -19,12 +18,4 @@ abstract class ReactNativeTestViewManagerSpec<T : View> : SimpleViewManager<T>()
   override fun getDelegate(): ViewManagerDelegate<T>? {
     return mDelegate
   }
-
-  companion object {
-    init {
-      if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-        SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION)
-      }
-    }
-  }
 }
Java and Objective C Fabric view
diff --git a/android/build.gradle b/android/build.gradle
index 819e9cf..b6d2a41 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,31 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -58,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -76,42 +47,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -161,7 +103,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java
index 134b236..5eff257 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java
@@ -11,19 +11,12 @@ import com.facebook.react.uimanager.ViewManagerDelegate;
 import com.facebook.react.uimanager.annotations.ReactProp;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface;
-import com.facebook.soloader.SoLoader;
 
 @ReactModule(name = ReactNativeTestViewManager.NAME)
 public class ReactNativeTestViewManager extends SimpleViewManager<ReactNativeTestView> implements ReactNativeTestViewManagerInterface<ReactNativeTestView> {
 
   public static final String NAME = "ReactNativeTestView";
 
-  static {
-    if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-      SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION);
-    }
-  }
-
   private final ViewManagerDelegate<ReactNativeTestView> mDelegate;
 
   public ReactNativeTestViewManager() {
Kotlin and Objective C Fabric view
diff --git a/android/build.gradle b/android/build.gradle
index f5b4414..e358a45 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,31 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -64,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -82,42 +53,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -169,7 +111,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt
index 1bd84ad..2c409fe 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt
@@ -8,7 +8,6 @@ import com.facebook.react.uimanager.ViewManagerDelegate
 import com.facebook.react.uimanager.annotations.ReactProp
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate
-import com.facebook.soloader.SoLoader
 
 @ReactModule(name = ReactNativeTestViewManager.NAME)
 class ReactNativeTestViewManager : SimpleViewManager<ReactNativeTestView>(),
@@ -38,11 +37,5 @@ class ReactNativeTestViewManager : SimpleViewManager<ReactNativeTestView>(),
 
   companion object {
     const val NAME = "ReactNativeTestView"
-
-    init {
-      if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-        SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION)
-      }
-    }
   }
 }

Repository owner deleted a comment from github-actions bot Oct 19, 2023
atlj added a commit that referenced this pull request Oct 27, 2023
### Summary

This removes the (non-working) support for `aar` targets.
Originally, the `aar` support was added with #4 to support AndroidX.
However, it's not needed anymore so we are removing the support.

### Test plan

1. Create a new library with `npx create-react-native-library`
2. Add `aar` to targets
3. run `yarn prepack`
4. Make sure an error is printed and the program stops.
@atlj atlj force-pushed the @atlj/diff-commentor branch from 93fe8d2 to 60b6d29 Compare October 27, 2023 18:30
@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of affected templates below:

Java and Objective C Native module
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Java and Swift Native module
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Kotlin and Objective C Native module
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Kotlin and Swift Native module
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Java and Objective C Turbo module with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 6e85436..e55502d 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Objective C Turbo module with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 702d817..81f1652 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Objective C Turbo module
diff --git a/android/build.gradle b/android/build.gradle
index ef3a4fb..89a4959 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Kotlin and Objective C Turbo module
diff --git a/android/build.gradle b/android/build.gradle
index a5f9e58..f46d668 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
Java and Objective C Native view
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';
Java and Swift Native view
diff --git a/android/build.gradle b/android/build.gradle
index 6b640c5..7f78099 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,9 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -36,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';
Kotlin and Objective C Native view
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';
Kotlin and Swift Native view
diff --git a/android/build.gradle b/android/build.gradle
index 04af710..ecbbb03 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,9 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -42,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';
Java and Objective C Fabric view with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 37019b9..d6526ac 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,31 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -58,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -76,42 +47,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -164,7 +106,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/newarch/ReactNativeTestViewManagerSpec.java b/android/src/newarch/ReactNativeTestViewManagerSpec.java
index 62dea01..ca429b2 100644
--- a/android/src/newarch/ReactNativeTestViewManagerSpec.java
+++ b/android/src/newarch/ReactNativeTestViewManagerSpec.java
@@ -8,15 +8,8 @@ import com.facebook.react.uimanager.SimpleViewManager;
 import com.facebook.react.uimanager.ViewManagerDelegate;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface;
-import com.facebook.soloader.SoLoader;
 
 public abstract class ReactNativeTestViewManagerSpec<T extends View> extends SimpleViewManager<T> implements ReactNativeTestViewManagerInterface<T> {
-  static {
-    if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-      SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION);
-    }
-  }
-
   private final ViewManagerDelegate<T> mDelegate;
 
   public ReactNativeTestViewManagerSpec() {
Kotlin and Objective C Fabric view with backward compat
diff --git a/android/build.gradle b/android/build.gradle
index 021b500..0f5864e 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,31 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -64,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -82,42 +53,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -172,7 +114,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/newarch/ReactNativeTestViewManagerSpec.kt b/android/src/newarch/ReactNativeTestViewManagerSpec.kt
index 676406a..a940078 100644
--- a/android/src/newarch/ReactNativeTestViewManagerSpec.kt
+++ b/android/src/newarch/ReactNativeTestViewManagerSpec.kt
@@ -7,7 +7,6 @@ import com.facebook.react.uimanager.SimpleViewManager
 import com.facebook.react.uimanager.ViewManagerDelegate
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface
-import com.facebook.soloader.SoLoader
 
 abstract class ReactNativeTestViewManagerSpec<T : View> : SimpleViewManager<T>(), ReactNativeTestViewManagerInterface<T> {
   private val mDelegate: ViewManagerDelegate<T>
@@ -19,12 +18,4 @@ abstract class ReactNativeTestViewManagerSpec<T : View> : SimpleViewManager<T>()
   override fun getDelegate(): ViewManagerDelegate<T>? {
     return mDelegate
   }
-
-  companion object {
-    init {
-      if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-        SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION)
-      }
-    }
-  }
 }
Java and Objective C Fabric view
diff --git a/android/build.gradle b/android/build.gradle
index 819e9cf..b6d2a41 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,31 +15,6 @@ def isNewArchitectureEnabled() {
 
 apply plugin: "com.android.library"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -58,11 +33,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -76,42 +47,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -161,7 +103,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java
index 134b236..5eff257 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.java
@@ -11,19 +11,12 @@ import com.facebook.react.uimanager.ViewManagerDelegate;
 import com.facebook.react.uimanager.annotations.ReactProp;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate;
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface;
-import com.facebook.soloader.SoLoader;
 
 @ReactModule(name = ReactNativeTestViewManager.NAME)
 public class ReactNativeTestViewManager extends SimpleViewManager<ReactNativeTestView> implements ReactNativeTestViewManagerInterface<ReactNativeTestView> {
 
   public static final String NAME = "ReactNativeTestView";
 
-  static {
-    if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-      SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION);
-    }
-  }
-
   private final ViewManagerDelegate<ReactNativeTestView> mDelegate;
 
   public ReactNativeTestViewManager() {
Kotlin and Objective C Fabric view
diff --git a/android/build.gradle b/android/build.gradle
index f5b4414..e358a45 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -21,31 +21,6 @@ def isNewArchitectureEnabled() {
 apply plugin: "com.android.library"
 apply plugin: "kotlin-android"
 
-import groovy.json.JsonSlurper
-
-// https://github.com/callstack/react-native-builder-bob/discussions/359
-def registrationCompat = {
-  // The new distribution model uses Maven Central https://reactnative.dev/blog/2023/01/12/version-071
-  def reactAndroidProject = rootProject.allprojects.find { it.name == 'ReactAndroid' }
-  if (reactAndroidProject == null) return false
-
-  def reactNativeManifest = file("${reactAndroidProject.projectDir}/../package.json")
-  def reactNativeVersion = new JsonSlurper().parseText(reactNativeManifest.text).version as String
-  // Fabric was introduced at [email protected], full CMake support were introduced at [email protected]
-  // Use Android.mk for compatibility with [email protected]/0.69
-  reactNativeVersion.matches('(0.68.*|0.69.*)')
-}()
-
-def codegenViewLibraryName = "ReactNativeTestView"
-def codegenViewModuleName = {
-  // Autolink for Fabric uses codegenConfig.name in package.json since [email protected]
-  // Use codegenViewLibraryName for compatibility with [email protected]/0.69
-  def libraryManifestJson = new JsonSlurper().parseText(file("$projectDir/../package.json").text)
-  registrationCompat ? codegenViewLibraryName : libraryManifestJson.codegenConfig.name
-}()
-
-def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
-
 if (isNewArchitectureEnabled()) {
   apply plugin: "com.facebook.react"
 }
@@ -64,11 +39,7 @@ def supportsNamespace() {
   def minor = parsed[1].toInteger()
 
   // Namespace support was added in 7.3.0
-  if (major == 7 && minor >= 3) {
-    return true
-  }
-
-  return major >= 8
+  return (major == 7 && minor >= 3) || major >= 8
 }
 
 android {
@@ -82,42 +53,13 @@ android {
     }
   }
 
-  ndkVersion getExtOrDefault("ndkVersion")
   compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
 
   defaultConfig {
     minSdkVersion getExtOrIntegerDefault("minSdkVersion")
     targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
     buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
-    buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null")
-
-    if (isNewArchitectureEnabled() && registrationCompat) {
-      def reactAndroidProject = project(':ReactAndroid')
-      externalNativeBuild {
-        ndkBuild {
-          arguments "APP_PLATFORM=android-21",
-                    "APP_STL=c++_shared",
-                    "NDK_TOOLCHAIN_VERSION=clang",
-                    "GENERATED_SRC_DIR=$buildDir/generated/source", // for react_codegen_* in this library's codegen/jni
-                    "PROJECT_BUILD_DIR=${appProject.buildDir}", // for REACT_NDK_EXPORT_DIR in ReactAndroid's Android-prebuilt.mk
-                    "REACT_ANDROID_DIR=${reactAndroidProject.projectDir}",
-                    "REACT_ANDROID_BUILD_DIR=${reactAndroidProject.buildDir}",
-                    "CODEGEN_MODULE_NAME=$codegenViewModuleName"
-          cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
-          cppFlags "-std=c++17"
-          targets "${codegenViewModuleName}_registration"
-        }
-      }
-    }
-  }
 
-  if (isNewArchitectureEnabled() && registrationCompat) {
-    // We configure the NDK build only if you decide to opt-in for the New Architecture.
-    externalNativeBuild {
-      ndkBuild {
-        path "Android.mk"
-      }
-    }
   }
 
   buildFeatures {
@@ -169,7 +111,7 @@ dependencies {
 if (isNewArchitectureEnabled()) {
   react {
     jsRootDir = file("../src/")
-    libraryName = codegenViewLibraryName
+    libraryName = "ReactNativeTestView"
     codegenJavaPackageName = "com.bob.reactnativetest"
   }
 }
diff --git a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt
index 1bd84ad..2c409fe 100644
--- a/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt
+++ b/android/src/main/java/com/bob/reactnativetest/ReactNativeTestViewManager.kt
@@ -8,7 +8,6 @@ import com.facebook.react.uimanager.ViewManagerDelegate
 import com.facebook.react.uimanager.annotations.ReactProp
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerInterface
 import com.facebook.react.viewmanagers.ReactNativeTestViewManagerDelegate
-import com.facebook.soloader.SoLoader
 
 @ReactModule(name = ReactNativeTestViewManager.NAME)
 class ReactNativeTestViewManager : SimpleViewManager<ReactNativeTestView>(),
@@ -38,11 +37,5 @@ class ReactNativeTestViewManager : SimpleViewManager<ReactNativeTestView>(),
 
   companion object {
     const val NAME = "ReactNativeTestView"
-
-    init {
-      if (BuildConfig.CODEGEN_MODULE_REGISTRATION != null) {
-        SoLoader.loadLibrary(BuildConfig.CODEGEN_MODULE_REGISTRATION)
-      }
-    }
   }
 }

@github-actions
Copy link

🤓☝️ This PR changes the output of create-react-native-library. You can find the diffs of affected templates below:

Java and Objective C Native module
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Java and Swift Native module
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Kotlin and Objective C Native module
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Kotlin and Swift Native module
diff --git a/src/NativeReactNativeTest.ts b/src/NativeReactNativeTest.ts
new file mode 100644
index 0000000..02186fb
--- /dev/null
+++ b/src/NativeReactNativeTest.ts
@@ -0,0 +1,22 @@
+import { NativeModules, Platform } from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+const ReactNativeTest = NativeModules.ReactNativeTest
+  ? NativeModules.ReactNativeTest
+  : new Proxy(
+      {},
+      {
+        get() {
+          throw new Error(LINKING_ERROR);
+        },
+      }
+    );
+
+export function multiply(a: number, b: number): Promise<number> {
+  return ReactNativeTest.multiply(a, b);
+}
diff --git a/src/index.tsx b/src/index.tsx
index 02186fb..4d5bff6 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,22 +1,2 @@
-import { NativeModules, Platform } from 'react-native';
+export * from './NativeReactNativeTest';
 
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-const ReactNativeTest = NativeModules.ReactNativeTest
-  ? NativeModules.ReactNativeTest
-  : new Proxy(
-      {},
-      {
-        get() {
-          throw new Error(LINKING_ERROR);
-        },
-      }
-    );
-
-export function multiply(a: number, b: number): Promise<number> {
-  return ReactNativeTest.multiply(a, b);
-}
Java and Objective C Native view
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';
Java and Swift Native view
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';
Kotlin and Objective C Native view
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';
Kotlin and Swift Native view
diff --git a/src/ReactNativeTestView.ts b/src/ReactNativeTestView.ts
new file mode 100644
index 0000000..9d66cf4
--- /dev/null
+++ b/src/ReactNativeTestView.ts
@@ -0,0 +1,25 @@
+import {
+  requireNativeComponent,
+  UIManager,
+  Platform,
+  ViewStyle,
+} from 'react-native';
+
+const LINKING_ERROR =
+  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
+  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
+  '- You rebuilt the app after installing the package\n' +
+  '- You are not using Expo Go\n';
+
+type ReactNativeTestProps = {
+  color: string;
+  style: ViewStyle;
+};
+
+const ComponentName = 'ReactNativeTestView';
+
+export const ReactNativeTestView = UIManager.getViewManagerConfig(ComponentName) != null
+  ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
+  : () => {
+      throw new Error(LINKING_ERROR);
+    };
diff --git a/src/index.tsx b/src/index.tsx
index b6c5b72..266fa0e 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,26 +1 @@
-import {
-  requireNativeComponent,
-  UIManager,
-  Platform,
-  type ViewStyle,
-} from 'react-native';
-
-const LINKING_ERROR =
-  `The package '@bob/react-native-test' doesn't seem to be linked. Make sure: \n\n` +
-  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
-  '- You rebuilt the app after installing the package\n' +
-  '- You are not using Expo Go\n';
-
-type ReactNativeTestProps = {
-  color: string;
-  style: ViewStyle;
-};
-
-const ComponentName = 'ReactNativeTestView';
-
-export const ReactNativeTestView =
-  UIManager.getViewManagerConfig(ComponentName) != null
-    ? requireNativeComponent<ReactNativeTestProps>(ComponentName)
-    : () => {
-        throw new Error(LINKING_ERROR);
-      };
+export * from './ReactNativeTestView';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant