-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support additional-app-test-apks
#83
Conversation
Hey, thanks for the contribution! I'd like to not use a custom class here. I like where this is going though. Perhaps if this were a Map<String, String> I think it would work. |
Hey thanks for the update, what do you think of using |
Sounds good! |
Updated |
Hey, sorry, I must have missed this in the first review. I was looking at this from mobile. I would like to be able to keep the current api with |
I've updated again with restored debugApk and instrumentationApk fields |
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.
Looks great! I just need to think over if I like the explicit way you specified the debug apks for each instrumentation apk. I think it can make it easier to debug the flank configs. Thoughts?
@@ -56,6 +56,17 @@ internal class YamlWriter { | |||
appendln(" - $file") | |||
} | |||
} | |||
val testApks = config.additionalTestApks.flatMap { (debugApk, instrumentationApks) -> |
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.
This code can be somewhat simplified a bit since the instrumentation apk will take whatever value is above is as the debug apk. See the readme. https://github.com/TestArmada/flank/blob/master/README.md
if (config.additionalTestApks.isNotEmpty()) {
appendln(" additional-app-test-apks:")
config.additionalTestApks.entries.forEach { debugApk, instrumentationApks ->
appendln(" - app: ${debugApk}")
instrumentationApks.forEach {
appendln(" test: ${it}")
}
}
On the other hand, I do like the more explicit output format that you created here. Let me think this one over overnight. :)
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.
Should I change this?
@@ -104,6 +104,9 @@ class FlankGradlePlugin : Plugin<Project> { | |||
} | |||
checkNotNull(base.debugApk!!) { "debugApk file cannot be null ${base.debugApk}" } | |||
checkNotNull(base.instrumentationApk!!) { "instrumentationApk file cannot be null ${base.instrumentationApk}" } | |||
base.additionalTestApks.forEach { |
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.
👍
@@ -121,6 +122,9 @@ This is the path to the app's debug apk. | |||
### instrumentationApk | |||
This is the path to the app's instrumentation apk. | |||
|
|||
### additionalTestApks |
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.
can you add a short sample? and that it is a map of debug apks to a list of instrumentation apks? thanks :)
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.
Let's do this! Sorry for not responding earlier.
Let me know if this dsl is acceptable if not, let me know how to adjust it.