Skip to content

Commit

Permalink
Detox configuration for Android on Apple Silicon (#1954)
Browse files Browse the repository at this point in the history
Co-authored-by: github@zbay.llc <github@zbay.llc>
  • Loading branch information
siepra and githubquiet committed Oct 10, 2023
1 parent 0811ea3 commit f478af3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
13 changes: 13 additions & 0 deletions packages/mobile/.detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ module.exports = {
avdName: 'emulator',
},
},
emulator_ci: {
type: 'android.emulator',
device: {
avdName: 'Pixel_3a_API_34_arm64-v8a',
},
},
},
configurations: {
'ios.sim.debug': {
Expand Down Expand Up @@ -135,6 +141,13 @@ module.exports = {
rootDir: './e2e/artifacts/android',
},
},
'android.emu.debug.ci': {
device: 'emulator_ci',
app: 'android.debug',
artifacts: {
rootDir: './e2e/artifacts/android',
},
},
'android.emu.storybook': {
device: 'emulator',
app: 'android.storybook',
Expand Down
5 changes: 4 additions & 1 deletion packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ def reactNativeArchitectures() {
return value ? value.split(",") : ["arm64-v8a"]
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

android {
ndkPath NDK_PATH
ndkPath properties.getProperty('ndk.dir')

ndkVersion rootProject.ext.ndkVersion

Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
Expand Down

0 comments on commit f478af3

Please sign in to comment.