diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-conventions.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-conventions.gradle.kts index 620543a3..354cd911 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/java-conventions.gradle.kts @@ -120,10 +120,10 @@ fun collectDependentProjectsTransitively(dependentProject: Project, dependentPro gradle.projectsEvaluated { tasks.javadoc { - val dependentProjects = HashSet() + val dependentProjects = LinkedHashSet() collectDependentProjectsTransitively(project, dependentProjects) val links = ArrayList() - for (dependentProject in dependentProjects) { + for (dependentProject in dependentProjects.sortedBy { it.name }) { dependsOn(dependentProject.tasks.javadoc) val javadocDir = dependentProject.layout.buildDirectory.map { it.dir("docs/javadoc") } inputs.dir(javadocDir)