Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Lazy Task Configuration for ktlint #189

Merged
merged 3 commits into from
May 18, 2019
Merged

Lazy Task Configuration for ktlint #189

merged 3 commits into from
May 18, 2019

Conversation

tasomaniac
Copy link
Contributor

@tasomaniac tasomaniac commented May 16, 2019

This is the last PR of the series where I enable lazy task configuration. Fixes #161

We had somewhat complex (but well tested) setup for ktlint where we support multiple versions even-though there were breaking changes in between. To be able to do this, I used matching to dynamically load all Ktlint tasks and pick the ones that we are interested in. This of course resolve tasks and breaks task configuration avoidance.

In order to handle this, we need to know more about how Ktlint tasks are created. With the latest versions, they are created per source set which is pretty consistent with other tools configurations we have

This is why support for version 6.1 is removed.

Additionally

Also added try-catch for any future exceptions with a clear output of the current state with clear message of which versions of Ktlint and Detekt we support.

Final screenshot:

All tools enabled from sample and majority of the tasks are avoided

image

We needed to drop support for ktlint 6.1.0
Also 7.0.0 is failing on Ktlint side now only on Kotlin only projects
@tasomaniac
Copy link
Contributor Author

Failed because Daemon disappeared unexpectedly. This happens when CI is busy/loaded. Will retry later

@mr-archano
Copy link
Contributor

@hal9002 retest this please

1 similar comment
@mr-archano
Copy link
Contributor

@hal9002 retest this please

@tasomaniac
Copy link
Contributor Author

All green 👍

@mr-archano mr-archano merged commit e9bb49a into develop May 18, 2019
@mr-archano mr-archano deleted the taso/lazy-ktlint branch May 18, 2019 19:12
@tasomaniac tasomaniac mentioned this pull request May 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants