Author SHA1 Message Date
NotAlexNoyle 8bf02309e9 Exclude libs source modules from Eclipse classpath 2026-03-09 11:24:51 -04:00
NotAlexNoyle 8701e289cd Merge pull request #7 from true-og/codex/update-eclipse-classpath-plugin-configuration
Derive Eclipse classpath project name from Gradle project name
2026-03-09 10:40:53 -04:00
+4 -1
View File
@@ -17,6 +17,7 @@ val sourcePluginProjects =
.map { it.path }
.filter { it.startsWith(":libs:") }
.distinct()
val sourcePluginProjectNames = sourcePluginProjects.map { it.substringAfterLast(":") }.toSet()
sourcePluginProjects.forEach { evaluationDependsOn(it) }
val ideLibs: Configuration by
@@ -94,8 +95,10 @@ val injectIdeLibs =
val kind = n.attributes?.getNamedItem("kind")?.nodeValue
val p = n.attributes?.getNamedItem("path")?.nodeValue ?: ""
val isIdeLibEntry = kind == "lib" && (p == dirPath || p.startsWith("$dirPath/"))
val sourceProjectPath = p.removePrefix("/")
val isHalfImportedSourceModule = kind == "src" && p.startsWith("/libs:")
if (isIdeLibEntry || isHalfImportedSourceModule) {
val isSourcePluginModule = kind == "src" && sourceProjectPath in sourcePluginProjectNames
if (isIdeLibEntry || isHalfImportedSourceModule || isSourcePluginModule) {
toRemove += n
}
}