It might help having some clarification on exactly what these various `.gradle`/`.gradle.kts` files are actually there for:
•
settings.gradle
sits in the root of your repo and tells Gradle some basic info for configuring the entire project as a whole. Most notably, what subprojects you have (the
include(":app")
lines in it)
• For every subproject listed in
settings.gradle
, a folder at the corresponding path (replace
:
with
/
) should have a
build.gradle
file. This file configures that specific subproject, and is typically where you’d add your
plugins { }
block or
apply plugin: ""
lines
• Additionally, you’ll probably have one more
build.gradle
file at the root of the repo. While this is a subproject just like the others, you might also see some stuff here that applies plugins or makes other configurations to all other subprojects. Generally, this is
not the place to add plugins such as
id 'org.jetbrains.kotlin.jvm'
or
id 'org.jetbrains.kotlin.plugin.serialization'