Created
June 9, 2025 15:09
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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