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

Please check contains "test" for skipTestGroups, not starts with #390

Closed
Vampire opened this issue Apr 22, 2024 · 5 comments · Fixed by #392
Closed

Please check contains "test" for skipTestGroups, not starts with #390

Vampire opened this issue Apr 22, 2024 · 5 comments · Fixed by #392

Comments

@Vampire
Copy link
Contributor

Vampire commented Apr 22, 2024

Currently, the skipTestGroups only checks for configurations starting with androidTest or test.
But this does not match things like integTest..., systemTest..., functionalTest..., ...
I think for the default recognition it would be more appropriate to check for toLowerCase().contains("test") instead.

To do something like that manually, you need some discouraged work-arounds like in the comments of #22 that reach into the models of all other projects to get all configuration names and then be able to filter on them, or list them all in the root project and hope none get added in subprojects in the future.

@jeremylong
Copy link
Collaborator

Sorry about the delay, I've had a ton going on outside of my OSS work. Can you take a look at #392 .

Does that work for you?

@Vampire
Copy link
Contributor Author

Vampire commented May 15, 2024

Sure, regex check is of course fine too.
I'd probably have done

boolean isTestConfiguration = configuration.name =~ /((^|[a-z0-9_])T|(^|_)t)est([A-Z0-9_]|$)/

instead though. :-)

jeremylong added a commit that referenced this issue May 15, 2024
- follow advice from @Vampire and embrace  groovy
- #390 (comment)
@jeremylong
Copy link
Collaborator

My groovy code looks so much like Java... Fixed: be04e39

@Vampire
Copy link
Contributor Author

Vampire commented May 16, 2024

Well, I wouldn't use Groovy for a public plugin anyway. :-D

@jeremylong
Copy link
Collaborator

In hindsight I wouldn't either.

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

Successfully merging a pull request may close this issue.

2 participants