mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Transitive dependencies for tests were not correct.
This commit is contained in:
parent
4ba5f5bee1
commit
45e40a1397
9 changed files with 59 additions and 35 deletions
|
@ -33,7 +33,8 @@ class DependencyData @Inject constructor(val executors: KobaltExecutors, val dep
|
|||
return DependencyData(d.id, scope, dep.jarFile.get().absolutePath)
|
||||
}
|
||||
|
||||
fun allDeps(l: List<IClasspathDependency>, name: String) = dependencyManager.transitiveClosure(l, name)
|
||||
fun allDeps(l: List<IClasspathDependency>, name: String) = dependencyManager.transitiveClosure(l,
|
||||
requiredBy = name)
|
||||
|
||||
val buildFile = BuildFile(Paths.get(buildFilePath), "GetDependenciesCommand")
|
||||
val buildFileCompiler = buildFileCompilerFactory.create(listOf(buildFile), pluginInfo)
|
||||
|
|
|
@ -183,7 +183,7 @@ class KotlinCompiler @Inject constructor(
|
|||
val executor = executors.newExecutor("KotlinCompiler", 10)
|
||||
val compilerVersion = settings.kobaltCompilerVersion
|
||||
val compilerDep = dependencyManager.create("org.jetbrains.kotlin:kotlin-compiler-embeddable:$compilerVersion")
|
||||
val deps = dependencyManager.transitiveClosure(listOf(compilerDep), project?.name ?: "")
|
||||
val deps = dependencyManager.transitiveClosure(listOf(compilerDep), requiredBy = project?.name ?: "")
|
||||
|
||||
// Force a download of the compiler dependencies
|
||||
deps.forEach { it.jarFile.get() }
|
||||
|
|
|
@ -121,7 +121,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
|
|||
val analyzer = Analyzer().apply {
|
||||
jar = aQute.bnd.osgi.Jar(project.projectProperties.get(Archives.JAR_NAME) as String)
|
||||
val dependencies = project.compileDependencies + project.compileRuntimeDependencies
|
||||
dependencyManager.calculateDependencies(project, context, dependencies).forEach {
|
||||
dependencyManager.calculateDependencies(project, context, allDependencies = dependencies).forEach {
|
||||
addClasspath(it.jarFile.get())
|
||||
}
|
||||
setProperty(Analyzer.BUNDLE_VERSION, project.version)
|
||||
|
|
|
@ -39,7 +39,8 @@ class WarGenerator @Inject constructor(val dependencyManager: DependencyManager)
|
|||
// The transitive closure of libraries goes into WEB-INF/libs.
|
||||
// Copy them all in kobaltBuild/war/WEB-INF/libs and create one IncludedFile out of that directory
|
||||
//
|
||||
val allDependencies = dependencyManager.calculateDependencies(project, context, project.compileDependencies)
|
||||
val allDependencies = dependencyManager.calculateDependencies(project, context,
|
||||
allDependencies = project.compileDependencies)
|
||||
|
||||
val outDir = project.buildDirectory + "/war"
|
||||
val fullDir = outDir + "/" + LIB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue