-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Redo Build Logic #744
Comments
One example of what I think can be improved: The main build file declares certain types of projects: def commonProjects = getCommonProjects()
def jsProjects = getJsProjects()
def jvmProjects = getJvmProjects()
def multiplatformProjects = commonProjects + jsProjects + jvmProjects The Next, we have: configureCommonProjects()
configureAndroidProjects()
configureJsProjects()
configureJvmProjects() These functions, once again, jump into the tutelli plugins. Afterwards, we do some more configuration in the root build file. Now imagine being in a subproject and trying to figure out how this project is built. One would first have to find out that the root build file does most of the configuration, then find out as which type the project gets classified and then collect all the bits where this type gets configured – including code from another repository. I think this could be improved by having reusable bits of configuration (for example from a a) we can see directly where the configuration is coming from. |
I planned to migrate to the new kotlin MPP plugin in either v0.16.0 or v0.17.0 and would therefore be happy if you could help out. I guess the examples in your second comment will then no longer be a problem.
Surprise... good with me, I actually planned to do it as well but... I also planned to factor out some logic into an own plugin (or buildSrc fine with me as well) at a later point. In any case, I would keep the following plugins for now
Might be I I am going to re-use tutteli-gradle-project-utils after your changes but we will see.
I would tackle this in a separate step but if you feel like it you can also do everything at once
I would also do this at a later stage. The generator works only due to some conventions and I don't want to expose it currently (as it would become public API). |
Factoring out logic is always good! Factoring out configuration is bad, from my point of view.
This seems to be mainly about logic (how to build
I’d have to see how the files would look like without it to have an opinion on this.
For me, it will be easier to do it at once. I don’t know the Gradle API by hand, so IDE completion is very welcome for me. It seems that we generally agree on what improvements to make. Great! I’ll tackle this if I find time (no promises, sorry!). |
In case you have time, then it probably makes sense if you do #641 as well (there is a closed PR which you could resurrect) |
Why is |
Because:
|
Since I am going to refactor bc-tests and this will affect settings.gradle as well, I am going to rewrite it to setttings.gradle.kts |
Cool thing! If this works well, maybe we can address this issue one step at a time. |
Doesn't work well at all. Intellij is constantly throwing errors (its basically this issue: https://youtrack.jetbrains.com/issue/KT-42769) until it stops monitoring fatal errors. The effect of it is, that syntax highlighting does not work well or is simply wrong. In this sense it is not much better than groovy in the end. Yet, I hope this is going to be fixed soon and thus I am still moving to .kts |
It looks more and more like only a big bang transition to the new MPP plugin will work (shame on Jetbrains, that's really a migration path I don't want for Atrium. That many issues I already stumbled over and had to find workarounds 😞). Hitting the following issue now: https://youtrack.jetbrains.com/issue/KT-32811 Edit maybe we are lucky and we can do the transition in multiple steps nonetheless by not yet setting up bc-tests for js |
This is unfortunate. A big bang redo of the build logic would surely be a big improvement, but is also difficult and involved to pull off. |
@Sxtanna I have pathed the way so that you can continue with the migration. I have migrated atrium-core to the new MPP plugin, thought without the JS target as this one can only be done in a big-bang. See f21b2a0#diff-e129df9e5134b2df3a6dd7417b8e0d6890a16212bbf423505ceeecfc80e62d5d to have an overview what I have done. There are a few specialities which you need to be aware of:
Moreover I suggest:
|
Good news, it looks like JetBrains has a workaround for the JS problem: |
was able to re-introduce the js target. last point is publishing, going to close this issue already |
This project’s build logic is, to put it mildly, involved. I think it could be improved upon.
I have two major criticisms:
project.ext
that are then read by other projects). Even though I’ve read through the build files a lot by now, I still don’t understand how it all works together. This is worsened by the fact that no help by the IDE is possible and that the logic relies on the robstoll Gradle plugins, which do a lot of magic and pre-configuration under the hood.I can’t promise I’ll find the time, but if I do, I’d like to improve the build logic of this project. I created this ticket so that we can agree on what a better build setup should look like.
I propose to:
What’s your opinion on this?
The text was updated successfully, but these errors were encountered: