Fix Gradle cache files being detected as Gradle DSL files #412
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
.gradle/
path matchingI have checked the contents of .gradle folder inside projects and it mostly contains intermediate building files users should never touch + gradle dependencies sources and classes.
As such I'm removing the matcher line that overrides detection for file extensions inside those folder to use Gradle asset.
This allows library sources to be detected as their original language while still keeping files with the .gradle extension to be detected by the gradle flavors.
This also doesn't break projects that use multiple .gradle DSL files to handle gradle project build as they'd still be recognized by the Gradle Groovy flavor.
Known issue: this doesn't seem to fix .gradle.kts files that are still detected as "Kotlin Script" instead of Gradle Kotlin.
But I don't know how to give priority to this extension instead of the standard Kotlin Script one, feel free to suggest changes though.