diff --git a/RNSentryAndroidTester/gradle.properties b/RNSentryAndroidTester/gradle.properties index 3c5031eb7..34d08a3f8 100644 --- a/RNSentryAndroidTester/gradle.properties +++ b/RNSentryAndroidTester/gradle.properties @@ -6,7 +6,7 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx3072m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects @@ -20,4 +20,4 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true diff --git a/samples/react-native/android/gradle.properties b/samples/react-native/android/gradle.properties index 756ff5b09..7c2c6c745 100644 --- a/samples/react-native/android/gradle.properties +++ b/samples/react-native/android/gradle.properties @@ -10,7 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m +org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=512m org.gradle.logging.level=lifecycle # When configured, Gradle will run in incubating parallel mode. diff --git a/scripts/e2e.mjs b/scripts/e2e.mjs index 4d3e358bf..e73ecb105 100755 --- a/scripts/e2e.mjs +++ b/scripts/e2e.mjs @@ -160,7 +160,8 @@ if (actions.includes('build')) { appProduct = `${appDir}/ios/DerivedData/Build/Products/${buildType}-iphonesimulator/${appName}.app`; } else if (platform == 'android') { - execSync(`./gradlew assemble${buildType} -PreactNativeArchitectures=x86`, { stdio: 'inherit', cwd: `${appDir}/android`, env: env }); + execSync(`./gradlew assemble${buildType} -PreactNativeArchitectures=x86 --no-daemon`, + { stdio: 'inherit', cwd: `${appDir}/android`, env: env }); appProduct = `${appDir}/android/app/build/outputs/apk/release/app-release.apk`; } diff --git a/test/perf/TestAppPlain/android/gradle.properties b/test/perf/TestAppPlain/android/gradle.properties index 9500894a1..78bb32e88 100644 --- a/test/perf/TestAppPlain/android/gradle.properties +++ b/test/perf/TestAppPlain/android/gradle.properties @@ -10,7 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m +org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=512m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/test/perf/TestAppSentry/android/gradle.properties b/test/perf/TestAppSentry/android/gradle.properties index 9500894a1..78bb32e88 100644 --- a/test/perf/TestAppSentry/android/gradle.properties +++ b/test/perf/TestAppSentry/android/gradle.properties @@ -10,7 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m +org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=512m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/test/react-native/rn.patch.gradle.properties.js b/test/react-native/rn.patch.gradle.properties.js index 8795c7ed3..f968c15cc 100755 --- a/test/react-native/rn.patch.gradle.properties.js +++ b/test/react-native/rn.patch.gradle.properties.js @@ -22,21 +22,22 @@ if (enableHermes === null) { } logger.info('Patching gradle.properties', args['gradle-properties']); -const content = fs.readFileSync(args['gradle-properties'], 'utf8'); +let content = fs.readFileSync(args['gradle-properties'], 'utf8'); const isHermesEnabled = content.includes('hermesEnabled=true'); -const shouldPatch = enableHermes !== isHermesEnabled; -if (shouldPatch) { +if (enableHermes !== isHermesEnabled) { const patch = enableHermes ? 'hermesEnabled=true' : 'hermesEnabled=false'; - const patched = content.match(/hermesEnabled=.*/) - ? content.replace(/hermesEnabled=.*/, patch) + content = content.match(/hermesEnabled=.*/) + ? content.replace(/hermesEnabled=.*/g, patch) : content.concat(`\n${patch}`); if (enableHermes) { logger.info('Patching gradle.properties for Hermes'); } else { logger.info('Patching gradle.properties for JSC'); } - fs.writeFileSync(args['gradle-properties'], patched); -} else { - logger.info('gradle.properties is already patched!'); } + +content = content.replace(/reactNativeArchitectures=.*/g, 'reactNativeArchitectures=x86'); +content = content.replace(/org.gradle.jvmargs=.*/g, 'org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=512m'); + +fs.writeFileSync(args['gradle-properties'], content);