Hello, I have a question regarding the Gradle Conv...
# getting-started
m
Hello, I have a question regarding the Gradle Convention Plugins for modularized structure-Shared build logic. If you check these below mentioned links 1. https://levelup.gitconnected.com/gradle-convention-plugins-shared-build-logic-android-muti-module-project-6bf090ee043a 2. https://proandroiddev.com/gradle-kotlin-convention-plugins-for-modularized-structure-shared-build-logic-e740e1f07e88 Reference Project: https://github.com/android/nowinandroid They have mentioned a step where we need to add
includeBuild("build-logic")
in
settings.gradle.kts
(Project Settings). And after that we need to enable version catalog feature in
settings.gradle.kts
(Included build:build-logic). So now my question is where does this
settings.gradle.kts
(Included build:build-logic) comes from ? Do we need to add this file manually by doing copy and paste ?
c
It's this file: https://github.com/android/nowinandroid/blob/main/build-logic/settings.gradle.kts As you can see, it already has the version catalog configured.
m
yes exactly. Where does it comes from ? Because when I try to make my build-logic as a module it doesn't come along with it.
c
How do you create it?
m
yes that's my question. How do you create it
c
Because when I try to make my build-logic as a module it doesn't come along with it.
What did you do?
You can just create the files manually if you want.
m
Just added a folder and named it "build-logic". Then I went to
settings.gradle (project settings)
file and added
Copy code
includeBuild("build-logic")
under
pluginManagement {}
c
a "build" in Gradle world is a folder that contains a
settings.gradle.kts
. If you do not create that file, you can't configure the build.
m
that means after adding
includeBuild("build-logic")
We have to create our own
settings.gradle.kts
under build-logic folder ?
c
Yes
You can copy the one from the sample
m
Alright. Thanks 🙂