Ray Rahke
03/15/2024, 9:20 AMbuild.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?Sam
03/15/2024, 9:39 AMsettings.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.Sam
03/15/2024, 9:39 AMbuild.properties.kts
, but that's not a real thing. I guess it was a typo.