Skip to content
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

p2: Detekt configuration clean up #148

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

ab-gnm
Copy link
Member

@ab-gnm ab-gnm commented Dec 9, 2024

Description

  • Removes the detekt convention plugin.
  • Converts the plugin code into an extension function on Project - setupDetekt()
  • Apply the new setupDetekt function to all module convention plugins - application, android library, kotlin library and test modules

This change means we don't need to remember to apply the plugin specifically to each module.

Another change is that we now only apply the plugin to debug builds. This doesn't make a difference in practice - we only have a single source set. But it makes a small improvement in build time since release sourceset tasks don't have to be configured and run.

Testing notes/instructions:

Ensure detekt checks pass below.

Checklist

  • Changes have been checked by the developer
  • Changes have been checked by the reviewers
  • Unit tested

@ab-gnm ab-gnm added the Android Android specific PRs label Dec 9, 2024
@ab-gnm ab-gnm marked this pull request as ready for review December 9, 2024 12:18
@ab-gnm ab-gnm requested a review from a team as a code owner December 9, 2024 12:18
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to SetupDetekt.kt below.

parallel = true

basePath = rootProject.projectDir.absolutePath
ignoredBuildTypes = listOf("release")
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the additional change here - ignoring release builds.

@ab-gnm ab-gnm changed the title Remove detekt convention plugin. Instead apply it to all module conve… p2: Detekt configuration clean up Dec 9, 2024
@ab-gnm ab-gnm merged commit 62539e7 into ab/add-binary-compatibility-plugin Dec 12, 2024
6 checks passed
@ab-gnm ab-gnm deleted the ab/change-detekt-config branch December 12, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android specific PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants