Simplify our buildSrc#3322
Simplify our buildSrc#3322BraisGabin merged 2 commits intodetekt:masterfrom BraisGabin:gradle-plugins
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3322 +/- ##
=========================================
Coverage 80.28% 80.28%
Complexity 2714 2714
=========================================
Files 445 445
Lines 8196 8196
Branches 1558 1558
=========================================
Hits 6580 6580
Misses 778 778
Partials 838 838 Continue to review full report at Codecov.
|
| from(components["java"]) | ||
| artifact(sourcesJar.get()) | ||
| artifact(javadocJar.get()) | ||
| if (project.name == "detekt-cli") { |
There was a problem hiding this comment.
Could we refactor this condition to detekt-cli?
There was a problem hiding this comment.
Yes, I agree that this should be removed too. But I'd prefer to do it in other PR.
| } | ||
| } | ||
|
|
||
| configure(subprojects.filter { it.name != "detekt-bom" }) { |
|
I think that this is a big change and we should wait for other maintainer to approve it. I know that @arturbosch worked a lot refactoring our gradle scripts (they were a real mess all in one file) so I think that we should wait a bit to merge this. |
Is it a good time to merge #3320 before this PR? #3320 creates merge conflicts for a few PRs already. |
build.gradle.kts
Outdated
| detekt | ||
| id("org.jetbrains.dokka") apply false | ||
| id("com.github.johnrengelman.shadow") apply false | ||
| id("com.github.johnrengelman.shadow") version "5.2.0" apply false |
There was a problem hiding this comment.
This introduces a new place to remember where a version needs to be changed.
Is this change necessary?
There was a problem hiding this comment.
I don't remember why I did that. Probably because we don't need the shadow pugin in buildSrc now. But I moved it to the buildSrc again 👍
* Move cli gradle configuration to its build.gradle.kts * Create plugin module so we can add it to each module
The idea is to simplify how we configure our own gradle.
Right now we force that all our modules have a specific configuration and with this new approuch we provide a plugin that configures the module as we want and is the module that opts-in this configuration.
An advantage is that we don't need to add exceptions for
:detekt-bom. It just don't use this module.The idea is that this is just the first step. Once we do this I'll like to use the plugin https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin to improve how we manage our dependencies because we add a lot by default and we probably don't need that much. And, probably, we could remove all the code in
commons.gradle.ktsat some point.This will help with the integration with the plugin
binary-compatibility-validatortoo. This last one was the trigger to start this refactor.