-
Notifications
You must be signed in to change notification settings - Fork 166
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
Use SourceSet in task names and reports files names. #180
Conversation
e6a12f3
to
cdff799
Compare
This is an API breaking change is it not? |
Kind of, though I don't think it is something very breaking:
Meta tasks names stays the same. |
Yea, I still think we have to mark this as a breaking change, unfortunately. |
Fine for me, we can do next release as |
Sure, that would make sense. |
cdff799
to
ba32d21
Compare
@JLLeitschuh updated changes in |
This better reflects on what exactly sources this tasks are working. Signed-off-by: Yahor Berdnikau <[email protected]>
/** | ||
* Create check task name from source set name. | ||
*/ | ||
internal fun String.sourceSetCheckTaskName() = "ktlint${capitalize()}SourceSetCheck" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is so nice with Kotlin to be able to do this.
I don't think there is such think as |
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |||
- ? | |||
### Changed | |||
- Update Kotlin to `1.3.10` version | |||
- Breaking: check/format tasks for specific source sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to have an example for Android. Something like below?
Example: In an Android project with
foo
flavor,ktlintFooDebugSourceSetCheck
task will check thefoo
sourceSet (notmain
).ktlintFooDebugCheck
meta task will check all the sourceSets forfooDebug
build variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add this explanation to the next PR that adds such variant meta tasks, as it, imho, belongs there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed 👍
I don't have any additional feedback to offer. If you want to add an example like @tasomaniac suggested, go for it. Otherwise, I'm happy to let this in as is. |
After reflecting on last discussion in #153, I think that it is better to rename check/format tasks, so they include
SourceSet
in their name (generated reports names are adjusted as well).This better reflects on what exactly sources task are working.
Related to #170