@@ -76,8 +76,10 @@ const withJscAndroid = (config) => {
7676 config = withJscAndroidAppBuildGradle ( config ) ;
7777 config = withJscAndroidProjectBuildGradle ( config ) ;
7878 config = withGradleProperties ( config , ( config ) => {
79+ const DEFAULT_ARCHS = [ 'arm64-v8a' , 'x86_64' ] ;
80+ const ARCHS_TO_REMOVE = new Set ( [ 'armeabi-v7a' , 'x86' ] ) ;
7981 const propertyName = 'reactNativeArchitectures' ;
80- const desiredValue = 'arm64-v8a' ;
82+ const desiredValue = DEFAULT_ARCHS . join ( ',' ) ;
8183 const existingProp = config . modResults . find (
8284 ( item ) => item . type === 'property' && item . key === propertyName
8385 ) ;
@@ -88,9 +90,14 @@ const withJscAndroid = (config) => {
8890 . map ( ( arch ) => arch . trim ( ) )
8991 . filter ( Boolean ) ;
9092 if ( ! archs . length ) return desiredValue ;
91- const result = archs . filter ( ( arch ) => arch !== 'armeabi-v7a' ) ;
93+ const result = [ ] ;
94+ archs . forEach ( ( arch ) => {
95+ if ( ! ARCHS_TO_REMOVE . has ( arch ) && ! result . includes ( arch ) ) {
96+ result . push ( arch ) ;
97+ }
98+ } ) ;
9299 if ( ! result . length ) return desiredValue ;
93- return Array . from ( new Set ( result ) ) . join ( ',' ) ;
100+ return result . join ( ',' ) ;
94101 } ;
95102 if ( existingProp ) {
96103 existingProp . value = cleanValue ( existingProp . value ) ;
0 commit comments