For all of my Intellij generated gradle projects, ...
# getting-started
r
For all of my Intellij generated gradle projects, I see a
build.properties.kts
file. But I've now gone the route of setting up a gradle project from scratch using the
gradle init
walkthrough tool, and it generated a
settings.gradle.kts
. Seems like it does the same thing as
build.properties.kts
? Does the name not matter?
s
settings.gradle.kts
and
build.gradle.kts
are two different files with two different purposes. The rules for what can go in each file are quite different. • Each project has a single
settings.gradle.kts
file in the project root. This can provide some global configuration for the whole project, though in a lot of simple projects it's basically empty. Creating a project without a settings file is not a great idea, though you do sometimes see projects where it's missing 😬. • The
build.gradle.kts
file configures a buildable module within the project. You can have more than one of these, in different directories, if your project is made up of multiple modules. A simple single-module project will just have both files next to each other in the root directory.
By the way, you mentioned
build.properties.kts
, but that's not a real thing. I guess it was a typo.