Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Split compiler plugin and its Gradle plugin into separate modules #61

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

3flex
Copy link
Member

@3flex 3flex commented Oct 12, 2022

The compiler plugin shouldn't include any Gradle-specific code, and the KotlinCompilerPluginSupportPlugin interface encourages adding a separate compiler plugin dependency by overriding getPluginArtifact.

add(SubpluginOption(Options.parallel, taskExtension.parallel.get().toString()))
add(SubpluginOption(Options.rootPath, project.rootDir.toString()))
add(SubpluginOption(Options.excludes, taskExtension.excludes.get().encodeToBase64()))
add(SubpluginOption("debug", taskExtension.debug.get().toString()))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going back to untyped strings isn't ideal, but to keep them means adding another module that both the Gradle plugin and the compiler plugin depend on.

The Kotlin compiler will error out if an unrecognised option is passed, so spelling errors here will be picked up for the most part. In future, functional tests should also exercise all options.

@3flex 3flex merged commit 7f3594d into detekt:main Oct 15, 2022
@3flex 3flex deleted the split-modules branch October 15, 2022 00:32
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants