diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt index c433ed2e07..1819124002 100644 --- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt +++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt @@ -54,7 +54,7 @@ fun DependencyHandlerScope.composeDependencies(libs: LibrariesForLibs) { } private fun DependencyHandlerScope.addImplementationProjects(directory: File, path: String, nameFilter: String) { - directory.listFiles().orEmpty().forEach { file -> + directory.listFiles().orEmpty().also { it.sort() }.forEach { file -> if (file.isDirectory) { val newPath = "$path:${file.name}" val buildFile = File(file, "build.gradle.kts") @@ -104,6 +104,7 @@ fun DependencyHandlerScope.allFeaturesApi(rootDir: File) { val featuresDir = File(rootDir, "features") addImplementationProjects(featuresDir, ":features", "api") } + fun DependencyHandlerScope.allFeaturesImpl(rootDir: File) { val featuresDir = File(rootDir, "features") addImplementationProjects(featuresDir, ":features", "impl") diff --git a/settings.gradle.kts b/settings.gradle.kts index 1173288adb..0fae407502 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -56,7 +56,7 @@ include(":anvilcodegen") include(":samples:minimal") fun includeProjects(directory: File, path: String, maxDepth: Int = 1) { - directory.listFiles().orEmpty().forEach { file -> + directory.listFiles().orEmpty().also { it.sort() }.forEach { file -> if (file.isDirectory) { val newPath = "$path:${file.name}" val buildFile = File(file, "build.gradle.kts")