Slackbot
05/16/2022, 10:05 AMephemient
05/16/2022, 10:20 AMRené
05/16/2022, 10:30 AMMarco Romano
05/16/2022, 11:53 AMRené
05/16/2022, 11:54 AMMarco Romano
05/16/2022, 11:55 AMversionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
Works within included builds too, right?Vampire
05/16/2022, 11:55 AMVampire
05/16/2022, 11:56 AMMarco Romano
05/16/2022, 12:44 PMClayton Walker
05/16/2022, 4:01 PMVampire
05/16/2022, 4:02 PMVampire
05/16/2022, 4:05 PMbuildSrc runs always before the build, an included build only if it really is referenced
buildSrc result is prepended to the build script class path of all main build build scripts and thus also invalidates all tasks up-to-dateness or cache entry if anything changes, included build is only on the classpath of the build scripts where it is used
buildSrc always also runs the tests, included build only runs the necessary work, that is builing the jar
buildSrc iirc cannot include other builds, included builds can
buildSrc is fixed where it is, included build can be wherever you like, like for example gradle/build-logic
....
to just name a fewClayton Walker
05/16/2022, 4:10 PMVampire
05/16/2022, 4:12 PMVampire
05/16/2022, 4:12 PMClayton Walker
05/16/2022, 4:13 PMClayton Walker
05/16/2022, 4:17 PMephemient
05/16/2022, 4:20 PMClayton Walker
05/16/2022, 4:37 PMClayton Walker
05/16/2022, 4:47 PMVampire
05/16/2022, 4:48 PMVampire
05/16/2022, 4:48 PMClayton Walker
05/16/2022, 4:48 PMWe ended up making the decision to publish our plugins to our Artifactory instance and resolve them like any other third-party Gradle plugin.
Clayton Walker
05/16/2022, 4:50 PMVampire
05/16/2022, 4:50 PMbuildSrc in one project where all is committed together in one repo, includeBuild is fine.
Always depends on the exact circumstances.Vampire
05/16/2022, 4:51 PMincludeBuild to replace the binary dependency, for example to do some work on it and live-test it right away.
That's the initial purpose of composite builds.
They just evolved to also be a way to structure your builds too.Clayton Walker
05/16/2022, 4:51 PMVampire
05/16/2022, 4:52 PMMarco Romano
05/17/2022, 6:37 AMbuildSrc to an included build would actually benefit our specific use case.
We only have a bunch of convention plugins in buildSrc, which are used by all subprojects so is it safe to say that:
Switching to an included build would give us no benefit as the included build would still be referenced by all subprojects and therefore will always run.runs always before the build, an included build only if it really is referencedbuildSrc
Switching to an included build would give us no benefit as the included build would still be referenced by all suprojects and therefore will always be in the classpath and will invalidate all subprojects when there are changes.result is prepended to the build script class path of all main build build scripts and thus also invalidates all tasks up-to-dateness or cache entry if anything changes, included build is only on the classpath of the build scripts where it is usedbuildSrc
In our specific use case, I actually prefer to always run the tests, because we have no dedicated tooling to run the tests of included builds automatically.always also runs the tests, included build only runs the necessary work, that is builing the jarbuildSrc
Not of concern in our use case.iirc cannot include other builds, included builds canbuildSrc
Not of concern in our use case. Are there any other aspects from which we could benefit from switching to an included build?is fixed where it is, included build can be wherever you like, like for example gradle/build-logicbuildSrc