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

detekt: Better type resolution integration #89

Open
osipxd opened this issue Nov 22, 2021 · 2 comments
Open

detekt: Better type resolution integration #89

osipxd opened this issue Nov 22, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@osipxd
Copy link
Collaborator

osipxd commented Nov 22, 2021

It is not transparent to users how to use detekt tasks with type resolution if it is not listed in ./gradlew tasks.
I think type resolution should be configured from config and not from task name.

@osipxd
Copy link
Collaborator Author

osipxd commented Dec 15, 2021

API might be like:

redmadrobot {
    detekt {
        useTypeResolution("release") // Here we can configure variant for android projects
    }
}

After this:

  • detekt plugin should be applied to all subprojects (where kotlin plugin is applied)
  • task detektAll should depend on the release detekt tasks with type resolution

@osipxd
Copy link
Collaborator Author

osipxd commented May 6, 2022

Found another problem of current approach. It is impossible to depend task on detekt[BuldVariant]All task because it will not be created if gradle command not includes detekt*All pattern.
So it is impossible to create task like this:

tasks.register("ciCheck") {
    // ...
    dependsOn("detektReleaseAll")
}

@osipxd osipxd added the enhancement New feature or request label Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant