Skip to content

Commit

Permalink
convert settings.gradle to kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
soloturn committed Oct 8, 2023
1 parent 983bba1 commit 4c75c5c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
16 changes: 0 additions & 16 deletions settings.gradle

This file was deleted.

18 changes: 18 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
rootProject.name = "Terasology"

includeBuild("build-logic")
include("engine", "engine-tests", "facades", "metas", "libs", "modules")

// Handy little snippet found online that'll "fake" having nested settings.gradle files under /modules, /libs, etc
rootDir.listFiles()?.forEach { possibleSubprojectDir ->
if (possibleSubprojectDir.isDirectory && possibleSubprojectDir.name != ".gradle") {
possibleSubprojectDir.walkTopDown().forEach {
it.listFiles { file -> file.isFile && file.name == "subprojects.settings.gradle" }?.forEach { subprojectsSpecificationScript ->
//println("Magic is happening, applying from $subprojectsSpecificationScript")
apply {
from(subprojectsSpecificationScript)
}
}
}
}
}

0 comments on commit 4c75c5c

Please sign in to comment.