-
Notifications
You must be signed in to change notification settings - Fork 417
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
Update build config to be more modular, using buildSrc convention plugins #2703
Comments
Other improvements I think can be made
|
@aSemy looks like the issue can be closed as completed? There's a PR for the module catalog, and integration tests I'd like to be refactored/re-written separately, there's a lot to improve.. |
There's some more work to do to make the build modular, as there's still some cross-project dependencies (e.g. publishing to Maven in integration tests). #2704 really laid down the ground work, so fixing these problems won't take as long to fix. I'm going to wait until #2652 is done though. Of course I don't need an issue to make PR, so this issue can be closed. |
The next few tasks I see are:
|
I'm puzzled about what to do with I can see the value of a test to make sure that publications are configured correctly, especially since there are multiple repos that need to be enabled/disabled conditionally based on the Dokka version and publication type, but I'm not sure how to implement that using a Gradle task... |
@aSemy I'll explain how it works and what I think it was made for, maybe it'll give you some ideas. In TeamCity we have the following configuration parameters for publishing: Where the
Based on the chosen So if The validate publication task asserts that the chosen So that we don't end up publishing Note: the Whether that's something that we need is a good question... It's nice to have, but if it's very difficult to implement or support, we can discuss dropping it.
|
Thanks for the info @IgnatBeresnev. I've been digging around in the code and seeing the intended usage makes it more clear. Something else to note is that Current goalMy current goal is to refactor the build logic to make Dokka build config one step closer to config cache compatibility, which is required for updating to Gradle 8. Proposed actionsHere's a list of my proposed actions:
It's a really nice idea, but it would need a big re-write to be compatible with the newer Gradle restrictions. However, I don't think it's necessary any more. The check was written before Dokka had any integration tests. This is no longer the case, and Dokka verifies publications are published by using MavenLocal. So, I think it can be safely removed! Here are two ideas I have to re-write the test to be compatible. Both of these would be complicated and redundant, but they're fun to think about.
|
Is your feature request related to a problem? Please describe
Presently the Dokka Gradle config uses a lot of
allprojects {}
andsubprojects {}
blocks to share configuration, but this is discouraged by GradleUsing inheritance makes configuring the project difficult, as it prevents subprojects from being ordered nicely (for example, it's not easily possible to have 'empty' subprojects, as the
subprojects{}
block will add the plugins to them). It also means configuration is applied, even when not desired. For example, Dokka always applies thekotlin("jvm")
plugindokka/build.gradle.kts
Line 44 in 8317436
But that's not required for the Gradle plugin project, as Gradle will supply the correct Kotlin plugin when the
kotlin-dsl
plugin is applied.Describe the solution you'd like
Dokka uses buildSrc convention plugins to configure and apply configuration in a modular way.
Describe alternatives you've considered
Additional context
This would help with implementation of #2700, so the Gradle Plugin subproject would not have unecessary configuration applied to it (like the
kotlin("jvm")
plugin.Are you willing to provide a PR?
I have made a start, but there's a lot of work to do!
The text was updated successfully, but these errors were encountered: