Migrate to build-logic convention plugins#238
Migrate to build-logic convention plugins#238makeevrserg wants to merge 3 commits intoElytrium:masterfrom
Conversation
|
Are changes like these really necessary? Personally, I can't stand Kotlin, and to me this kind of stuff just bloats and slows down the build system while making further changes more difficult. There used to be about three files needed for the build; now there are more than ten. For what, exactly? The end result is still the same. And honestly, did you really spend your own time on this, or did you just tell Claude to do it for you? |
Well, it seems better than put everything into one build.gradle, isn't it? If the complain is about kotlin, it, of course, can be written with java, but I made it the way I know how to do it
The build system actually becomes more clear and amount of anti patterns are reduced Yes, I did it myself. You can try it yourself. I don't think any llm is capable of converting groovy to build convention with the same output result |
|
Btw build.gradlre of plugin module literally unreadable and difficult to maintain, even if you say otherwise, it's still fact. And build convention here would help to make it easy to read and maintain |
That's because the entire mappings generator is located there. I've already fixed this in a separate branch, but unfortunately it won't be merged into master anytime soon. |
Also, in that branch, the total line count is 39 + 67 + 107 = 213, excluding the mappings generator |
|
Yes, I've seen it. And this fix is another popular antipattern, which contains whole logic inside one single file. |
|
By that logic, this whole project is just one big anti-pattern and we should split every class down into 10 classes by 20 lines each |
|
You are exaggerating now. I just follow logic of clean code and best ways of Gradle practices |
|
Fine. Anyway, @UserNugget, if there are no suggestions or comments, feel free to merge |
|
Looks pretty overcomplicated, Velocity implemented it way better and readable |
|
Yeah, can be done this way |
Summary
PR introduces a build-logic included build with convention plugins, replacing previous configuration approach. In addition, new setup will help to make project gradle plugins looks minimal, allows to configure the plugin-by plugin
Changes
id("net.elytrium.checkstyle")- Default configuration for checkstyleid("net.elytrium.java.version")- Configuration for JavaVersionid("net.elytrium.licence")- Configuration for licences filesid("net.elytrium.module.info")- Configuration for version/name of modulesid("net.elytrium.publish")- Configuration for publish into mavenid("net.elytrium.revision")- Provider for current revision numberid("net.elytrium.spotbugs")- Configuration for spotbugsallprojects/subprojectsblocks, which considered anipatterns, from root build.gradle.kts