1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Bug: multiple dependent projects were not creating correct jars.

This commit is contained in:
Cedric Beust 2015-12-15 21:24:24 +04:00
parent 57e0a62fca
commit 864b0f22e1

View file

@ -155,22 +155,19 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
val dependentProjects = project.projectProperties.get(JvmCompilerPlugin.DEPENDENT_PROJECTS) val dependentProjects = project.projectProperties.get(JvmCompilerPlugin.DEPENDENT_PROJECTS)
as List<ProjectDescription> as List<ProjectDescription>
listOf(dependencyManager.calculateDependencies(project, context, dependentProjects, val allDependencies = project.compileDependencies + project.compileRuntimeDependencies
project.compileDependencies), val transitiveDependencies = dependencyManager.calculateDependencies(project, context, dependentProjects,
dependencyManager.calculateDependencies(project, context, dependentProjects, allDependencies)
project.compileRuntimeDependencies)) transitiveDependencies.map {
.forEach { deps : List<IClasspathDependency> -> it.jarFile.get()
deps.map { }.forEach { file : File ->
it.jarFile.get() if (! seen.contains(file.path)) {
}.forEach { file : File -> seen.add(file.path)
if (! seen.contains(file.name)) { if (! KFiles.isExcluded(file, jar.excludes)) {
seen.add(file.name) allFiles.add(IncludedFile(arrayListOf(FileSpec(file.path))))
if (! KFiles.isExcluded(file, jar.excludes)) {
allFiles.add(IncludedFile(arrayListOf(FileSpec(file.path))))
}
}
}
} }
}
}
} }
// //