Skip to content
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

Is there any way to dynamicaly set testBuildType through patrol? #2155

Open
RomuloPBenedetti opened this issue Mar 17, 2024 · 2 comments
Open

Comments

@RomuloPBenedetti
Copy link

RomuloPBenedetti commented Mar 17, 2024

This will work with testBuildType "release" in gradle.build:

patrol test ... --release

But now this don't work:

patrol test ... --debug

Maybe if we could tell patrol to do ./gradlew ... -PtestBuildType=release

@bartekpacia
Copy link
Contributor

Why do you want to do this? (I'm guessing it's related to #1542)

You could try doing some Gradle wizardry and conditionally assign testBuildType basing on current build variant (debug, release, etc.). But, as most things Gradle, this seems simple but it's actually hard - I'm not aware of a nice solution.

@RomuloPBenedetti
Copy link
Author

It was partially related to #1542, I made the bad decision to tie firebase emulator to build types. Took some time this week to evaluate the situation and dig a bit more on Patrol documentation and decided to use --dart-define.

Maybe it would be a good idea to specify in the docs in the future that "--release" or "--profile" must be aligned to testBuildType when testing in Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants