-
Notifications
You must be signed in to change notification settings - Fork 475
chore: e2e Android #474
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
chore: e2e Android #474
Conversation
72839b4
to
955221f
Compare
a95e889
to
743aec6
Compare
743aec6
to
ebc1912
Compare
allprojects { | ||
repositories { | ||
maven { | ||
url("$rootDir/../../node_modules/detox/Detox-android") | ||
} | ||
} | ||
afterEvaluate { project -> | ||
def androidExtension = project.extensions.findByName('android') | ||
|
||
if(androidExtension != null && project.name == 'app') { | ||
// android extension from test-app pacakge | ||
androidExtension.defaultConfig { | ||
ndk { | ||
abiFilters 'arm64-v8a', 'x86', 'x86_64' | ||
} | ||
} | ||
|
||
androidExtension.signingConfigs { | ||
test { | ||
storeFile file('debug.keystore') | ||
storePassword 'android' | ||
keyAlias 'androiddebugkey' | ||
keyPassword 'android' | ||
} | ||
} | ||
|
||
androidExtension.buildTypes.release.signingConfig = androidExtension.signingConfigs.test | ||
androidExtension.testBuildType = 'release' | ||
|
||
androidExtension.sourceSets.androidTest.java.srcDirs += "$rootDir/app/src/androidTest/java" | ||
|
||
project.dependencies { | ||
androidTestImplementation('com.wix:detox:+') | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arazabishov: Do you think we can simplify how devs can customize react-native-test-app
? Not sure if this is normal as far as Gradle configs go but it seems a bit cumbersome to add signingConfigs
and Detox specific things, imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is fine to leverage the flexibility of Gradle when needed, like in this case. If we were about to parameterize all of the things above, we will find ourselves trying to replicate AGP's API. What we can do is provide a convenient way to tap into androidExtension, so users don't have to search for it themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is normal, then I think it's probably fine. We can add a "recipe" in our wiki and point people in that direction when they need to add stuff.
🎉 This PR is included in version 1.13.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary:
Bringing back Android e2e tests. Had to do some in-depth testing for environment, and ended up with different macos versions for e2e android and ios (due to different JDK versions).
Additionally,
pods caching
, to speedup iOS builds and tests.Test Plan:
Green CI.