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

Refactor.

This commit is contained in:
Cedric Beust 2016-07-07 02:42:28 -08:00
parent 8bfc671c27
commit 922602f01a

View file

@ -194,11 +194,12 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val
: List<IClasspathDependency> { : List<IClasspathDependency> {
val transitive = hashSetOf<IClasspathDependency>() val transitive = hashSetOf<IClasspathDependency>()
with(project) { with(project) {
context.variant.let { variant ->
val deps = arrayListOf(compileDependencies, compileProvidedDependencies, val deps = arrayListOf(compileDependencies, compileProvidedDependencies,
context.variant.buildType.compileDependencies, variant.buildType.compileDependencies,
context.variant.buildType.compileProvidedDependencies, variant.buildType.compileProvidedDependencies,
context.variant.productFlavor.compileDependencies, variant.productFlavor.compileDependencies,
context.variant.productFlavor.compileProvidedDependencies variant.productFlavor.compileProvidedDependencies
) )
if (isTest) { if (isTest) {
deps.add(testDependencies) deps.add(testDependencies)
@ -208,6 +209,7 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val
transitive.addAll(calculateDependencies(project, context, it)) transitive.addAll(calculateDependencies(project, context, it))
} }
} }
}
// Make sure that classes/ and test-classes/ are always at the top of this classpath, // Make sure that classes/ and test-classes/ are always at the top of this classpath,
// so that older versions of that project on the classpath don't shadow them // so that older versions of that project on the classpath don't shadow them