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

Decouple Gradle projects #3611

Merged
merged 3 commits into from
Mar 28, 2021
Merged

Decouple Gradle projects #3611

merged 3 commits into from
Mar 28, 2021

Conversation

3flex
Copy link
Member

@3flex 3flex commented Mar 27, 2021

This reduces the number of subprojects that have to be recompiled when there's a change to one of the rules, saving quite a bit of time when building the project.

The most interesting change is in the detekt-cli build file since the shadow jar config has changed. The new config can be verified by executing the resulting jar with --debug and confirming that the bundled rulesets have been registered.

@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #3611 (6500645) into main (dfdec5c) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 6500645 differs from pull request most recent head 73aa444. Consider uploading reports for the commit 73aa444 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3611      +/-   ##
============================================
- Coverage     77.52%   77.50%   -0.03%     
+ Complexity     2837     2834       -3     
============================================
  Files           464      464              
  Lines          8783     8783              
  Branches       1721     1721              
============================================
- Hits           6809     6807       -2     
  Misses         1047     1047              
- Partials        927      929       +2     
Impacted Files Coverage Δ Complexity Δ
...osch/detekt/rules/bugs/WrongEqualsTypeParameter.kt 93.75% <0.00%> (-6.25%) 9.00% <0.00%> (-1.00%)
...ules/documentation/LicenceHeaderLoaderExtension.kt 78.57% <0.00%> (-2.39%) 5.00% <0.00%> (-1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfdec5c...73aa444. Read the comment docs.

detekt-cli/build.gradle.kts Show resolved Hide resolved
Copy link
Member

@BraisGabin BraisGabin left a comment

Choose a reason for hiding this comment

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

Great boost to the build time 👏🏻👏🏻

@@ -14,7 +14,7 @@ dependencies {
implementation(project(":detekt-report-xml"))
implementation(project(":detekt-report-sarif"))

testImplementation(project(":detekt-rules"))
testRuntimeOnly(project(":detekt-rules"))
Copy link
Member

Choose a reason for hiding this comment

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

It seems like we have at least one unit test that do far too much. Otherwise we should not need this, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah there are a couple of places detekt-rules is used when it maybe shouldn't be.

I'll open a new issue for that because it would help further with build times when iterating on rules.

@3flex 3flex merged commit 3c84797 into detekt:main Mar 28, 2021
@3flex 3flex deleted the decouple branch March 28, 2021 05:58
@cortinico cortinico added this to the 1.17.0 milestone May 1, 2021
@cortinico cortinico added the housekeeping Marker for housekeeping tasks and refactorings label May 1, 2021
@3flex 3flex restored the decouple branch July 29, 2021 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Marker for housekeeping tasks and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants