Skip to content

Instantly share code, notes, and snippets.

@galex
Created June 9, 2025 15:09
Show Gist options
  • Save galex/a5a230544be8e3792e5e0118b110cd69 to your computer and use it in GitHub Desktop.
Save galex/a5a230544be8e3792e5e0118b110cd69 to your computer and use it in GitHub Desktop.
A few magic lines to configure modules to user their own name as the build file name
// Configure modules to use their own name as the build file name
// app/build.gradle.kts -> app/app.gradle.kts
// features/home/build.gradle.kts -> features/home/home.gradle.kts
rootProject.children.forEach { project ->
fun configureProject(project: ProjectDescriptor) {
project.buildFileName = "${project.name}.gradle.kts"
project.children.forEach { child ->
configureProject(child)
}
}
configureProject(project)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment