-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
check(it.value.isNotEmpty()) { "must provide at least one instrumentation apk for ${it.key}" } | ||
} | ||
} | ||
|
||
private fun automaticallyConfigureTestOrchestrator(project: Project, extension: FlankGradleExtension, androidExtension: AppExtension) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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
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 commentThe reason will be displayed to describe this comment to others. Learn more. Should I change this? |
||
instrumentationApks.map { debugApk to it } | ||
} | ||
|
||
if (testApks.isNotEmpty()) { | ||
appendln(" additional-app-test-apks:") | ||
testApks.forEach { | ||
appendln(" - app: ${it.first}") | ||
appendln(" test: ${it.second}") | ||
} | ||
} | ||
} | ||
|
||
internal fun writeAdditionalProperties(config: FladleConfig): String = buildString { | ||
|
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 :)