From da44d89aaaa8e6e011d83c5c9d687a20fb10d9f6 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Mon, 15 Dec 2025 16:04:39 -0300 Subject: [PATCH 1/2] fix(android): Remove isNewArchitectureEnabled check --- android/build.gradle | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b46c3668..8df0ccdd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -14,17 +14,9 @@ buildscript { } } -def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" -} - apply plugin: 'com.android.library' apply plugin: 'kotlin-android' - - -if (isNewArchitectureEnabled()) { - apply plugin: 'com.facebook.react' -} +apply plugin: 'com.facebook.react' def getExtOrDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['PagerView_' + name] @@ -42,7 +34,7 @@ if(shouldUseNameSpace){ manifestContent = manifestContent.replaceAll( PACKAGE_PROP, '' - ) + ) } else { if(!manifestContent.contains("$PACKAGE_PROP")){ manifestContent = manifestContent.replace( @@ -89,11 +81,11 @@ android { defaultConfig { minSdkVersion getExtOrIntegerDefault('minSdkVersion') targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') - buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() + buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", "true" - buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (isNewArchitectureEnabled() && registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null") + buildConfigField "String", "CODEGEN_MODULE_REGISTRATION", (registrationCompat ? "\"${codegenViewModuleName}_registration\"" : "null") - if (isNewArchitectureEnabled() && registrationCompat) { + if (registrationCompat) { def reactAndroidProject = project(':ReactAndroid') externalNativeBuild { ndkBuild { @@ -113,7 +105,7 @@ android { } } - if (isNewArchitectureEnabled() && registrationCompat) { + if (registrationCompat) { // We configure the NDK build only if you decide to opt-in for the New Architecture. externalNativeBuild { ndkBuild { @@ -138,14 +130,10 @@ android { } sourceSets { main { - if (isNewArchitectureEnabled()) { - java.srcDirs += [ - "src/fabric/java", - "${project.buildDir}/generated/source/codegen/java" - ] - } else { - java.srcDirs += ["src/paper/java"] - } + java.srcDirs += [ + "src/fabric/java", + "${project.buildDir}/generated/source/codegen/java" + ] } } } @@ -229,10 +217,8 @@ dependencies { implementation 'androidx.viewpager2:viewpager2:1.1.0' } -if (isNewArchitectureEnabled()) { - react { - jsRootDir = file("../src") - libraryName = codegenViewLibraryName - codegenJavaPackageName = "com.reactnativepagerview" - } +react { + jsRootDir = file("../src") + libraryName = codegenViewLibraryName + codegenJavaPackageName = "com.reactnativepagerview" } From e5867ff4f13f3d6a1b2fbd78261c68b2c51e691e Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Mon, 15 Dec 2025 20:17:10 +0100 Subject: [PATCH 2/2] Update android/build.gradle Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8df0ccdd..de7c175a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -106,7 +106,7 @@ android { } if (registrationCompat) { - // We configure the NDK build only if you decide to opt-in for the New Architecture. + // We configure the NDK build when registrationCompat is enabled. externalNativeBuild { ndkBuild { path "Android.mk"