André Martins
03/25/2022, 10:34 AMAndré Martins
03/25/2022, 10:35 AMVampire
03/25/2022, 10:49 AMapply from
), but I wouldn't ever use them these days, especially not with Kotlin DSL as you don't get type-safe accessors generated for them.
The way better option is to use pre-compiled script plugins (foo.gradle.kts
in buildSrc
or - what I greatly prefer - in an included build like gradle/build-logic
).
Also can I have buildSrc folder in submodules?You can have a
buildSrc
folder wherever you like, but for it being what you meant, no, unless the submodules are own builds in a composite build and not subprojects. You can have exactly one buildSrc
project which is run before the main build and added to the class path of all build scripts.
But if you use included builds instead as I mentioned above, you can have multiple ones, whyever you would want to do that. But you still need a settings script and thus an "own" build to include them. But again, the question is why you want that. Depending on the answer there might be better options.André Martins
03/25/2022, 10:52 AMVampire
03/25/2022, 10:53 AMAndré Martins
03/25/2022, 10:55 AMAndré Martins
03/25/2022, 10:56 AMAndré Martins
03/25/2022, 10:57 AMVampire
03/25/2022, 11:09 AM