Allow for using a `PatternFilterable` to determine source processed by `JavaExtension` and `KotlinExtension`
See original GitHub issueSometimes you want your entire source code to be linted/formatted except for some code in a particular package.
For example, in my project I want everything reformatted except for things in files that match the pattern **/generated/**
.
When setting up my java source sets, if I didn’t want these files to be compiled I could do something like this:
sourceSets {
"main" {
java {
exclude("**/generated/**")
}
}
}
I propose that spotless should expose the same API for filtering out sources that I don’t want to be linted or reformatted.
I would expose an API that allowed the user to use a PatternFilterable
to configure what is excluded from the task’s target
FileCollection
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
PatternFilterable (Gradle API 7.6)
A PatternFilterable represents some file container which Ant-style include and exclude patterns or specs can be applied to. Patterns may include:.
Read more >Kotlin Language Documentation 1.7.21
Using with kapt. Command-line compiler. Kotlin Symbol Processing API. Overview. How KSP looks at source files.
Read more >PatternFilterable - api
A PatternFilterable represents some file container which Ant-style include and exclude ... then files must not match any exclude pattern to be processed....
Read more >Gradle User Manual | PDF | Command Line Interface - Scribd
You can see this with most language plugins, which add the concept of source sets to a build. Appropriate modeling of a build...
Read more >PDF - Kotlin 官方文档中文版
See the Create and publish a multiplatform library tutorial, ... It allows Kotlin developers to use familiar language features such.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s not time. It’s just that most of it lives on a git branch that has deviated so far from master that it’s going to be difficult to redo. I still have the branch checked out in a separate clone of the repo on my work machine.
I had to move a lot of code around to get it to work, ended up deleting some irrelevant projects for that the feature was making irrelevant, ect. That feature (actually more of a full project) got killed so the old code was still relevant.
I can port much of the same gradle logic, but I need to do the refactor and move code around dance all over again.
Fixed in 3.18.0.