[imltogradle] Add "imls in same directory are not allowed" check
This commit is contained in:
+6
@@ -94,6 +94,12 @@ fun main() {
|
|||||||
valueTransform = { (_, dependencyNotation) -> dependencyNotation }
|
valueTransform = { (_, dependencyNotation) -> dependencyNotation }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val imlsInSameDirectory: List<List<File>> = imlFiles.groupBy { it.parentFile }.filter { it.value.size > 1 }.map { it.value }
|
||||||
|
if (imlsInSameDirectory.isNotEmpty()) {
|
||||||
|
val report = imlsInSameDirectory.joinToString("\n") { "In same directory: " + it.joinToString() }
|
||||||
|
error("It's not allowed to have imls in same directory:\n$report")
|
||||||
|
}
|
||||||
|
|
||||||
imlFiles.mapNotNull { imlFile -> ijCommunityModuleNameToJpsModuleMapping[imlFile.nameWithoutExtension]?.let { imlFile to it } }
|
imlFiles.mapNotNull { imlFile -> ijCommunityModuleNameToJpsModuleMapping[imlFile.nameWithoutExtension]?.let { imlFile to it } }
|
||||||
.forEach { (imlFile, jpsModule) ->
|
.forEach { (imlFile, jpsModule) ->
|
||||||
println("Processing iml ${imlFile}")
|
println("Processing iml ${imlFile}")
|
||||||
|
|||||||
Reference in New Issue
Block a user