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

No need for the staticCheck #24

Closed
speekha opened this issue Aug 19, 2019 · 3 comments
Closed

No need for the staticCheck #24

speekha opened this issue Aug 19, 2019 · 3 comments

Comments

@speekha
Copy link

speekha commented Aug 19, 2019

Do you really need the staticCheck task in your gradle conf?
Couldn't you just do "./gradlew check" to perform all the tasks related to tests and deteckt/ktlint/etc.?

@igorwojda
Copy link
Owner

This is interesting. I did some investigation on check task.

  1. In general, it looks like something that I may want to use, however, for now, it looks like it is affected by ktlint-gradle plugin issue (filter config seems to be ignored JLLeitschuh/ktlint-gradle#266), so I have to wait for it to be fixed (otherwise ktlint settings are ignored and ktlint checks are failing).

  2. I noticed that check task runs all the checks twice (for Debug and Release), so I am guessing tests will run twice 🤔 Run to list tasks: ./gradlew check --dry-run | grep test. Result:

:feature_album:testDebugUnitTest
:feature_album:testReleaseUnitTest
:feature_album:test
...

@speekha
Copy link
Author

speekha commented Aug 22, 2019

Indeed, "gradle check" will test all build types, just like a "gradle test" would (in some cases, that could actually be useful if you have slight differences between the two variants, like obfuscation).
Thanks for the answer.

@speekha speekha closed this as completed Aug 22, 2019
@igorwojda
Copy link
Owner

Thx for the feedback.

BTW this makes me think that my static check task could be re-named to checkDebug and do exactly what check does, but only for all the Debug tasks (filtering our Release tasks). I will investigate it further when ktlint-gradle bug will be fixed

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