buildSrc vs build-logic
eduayuso opened this issue · comments
I have been using previous versions of moko-template and use it in own projects. I have noticed that the buildSrc is not present now, and build-logic and gradle/libs.versions.toml are replacing it. It is the natural replacement of buildSrc? Personally I prefer the buildSrc kotlin style, but I would like to know if there are some advantages of using build-logic over buildSrc.
hi!
build-logic
module is included build (feature composing builds - https://docs.gradle.org/current/userguide/composite_builds.html) and it better than buildSrc
in caching strategy. Also included build can be shared between gradle projects (that used in https://github.com/icerockdev/moko-network to connect one build-logic to library and plugin projects).
libs.versions.toml
used because it's out-of-box solution from gradle for dependencies definition - https://docs.gradle.org/current/userguide/platforms.html
Thanks for the info Alex! Yes, I have been reading some info and watching some projects and it seems to be a good improvement over buildSrc. I also noticed that with buildSrc kotlin sources gradle plugin did not detect changes so you have to manually refresh gradle dependencies when you make a change in some kotlin file inside buildSrc. So I'm willing to use this new aproach in organizing a gradle kmm project.