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

How do I run ktlintFormat for every build I make through Android Studio #692

Open
theapache64 opened this issue Feb 5, 2020 · 3 comments
Open
Labels

Comments

@theapache64
Copy link

@theapache64 theapache64 commented Feb 5, 2020

First of all, thank you for making this amazing tool. I really appreciate the time you take to sharpen this tool to its full potential.

So here's what I need.

Whenever I press the
image or build my project, I want to run ktlintFormat and if it fails, I want to fail the build process also.

Can you help me configure it ?

NOTE: Currently ./gradlew ktlintFormat works perfectly fine.

@Tapchicoma Tapchicoma added the question label Feb 5, 2020
@Tapchicoma

This comment has been minimized.

Copy link
Collaborator

@Tapchicoma Tapchicoma commented Feb 5, 2020

Usually in IDEA (Android Studio) run configuration it is possible to add additional step that could be some gradle task.

@theapache64

This comment has been minimized.

Copy link
Author

@theapache64 theapache64 commented Feb 6, 2020

I tried to add the task (ktlintFormat) to the run configuration, but it works parallel rather than sequential. Can you help me with steps on how to add the task sequentially so that it'd fail the build process if anythings wrong?

@Tapchicoma

This comment has been minimized.

Copy link
Collaborator

@Tapchicoma Tapchicoma commented Feb 8, 2020

You need to move added step to be on top of "build" step in run configuration.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.