diff --git a/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt b/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt index 9305fed0..6512c9a6 100644 --- a/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt +++ b/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt @@ -66,6 +66,8 @@ class KFiles { KFiles.joinDir(project.directory, project.buildDirectory, "generated", "source", name, variant.toIntermediateDir()) + fun buildDir(project: Project) = KFiles.makeDir(project.directory, project.buildDirectory) + /** * Join the paths elements with the file separator. */ diff --git a/src/main/kotlin/com/beust/kobalt/plugin/packaging/PackagingPlugin.kt b/src/main/kotlin/com/beust/kobalt/plugin/packaging/PackagingPlugin.kt index a6b159d4..1627cff6 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/packaging/PackagingPlugin.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/packaging/PackagingPlugin.kt @@ -60,7 +60,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana runTask = { taskAssemble(project) }) } - private fun libsDir(project: Project) = KFiles.makeDir(buildDir(project).path, "libs").path + private fun libsDir(project: Project) = KFiles.makeDir(KFiles.buildDir(project).path, "libs").path @Task(name = TASK_ASSEMBLE, description = "Package the artifacts", runAfter = arrayOf(JvmCompilerPlugin.TASK_COMPILE)) @@ -125,7 +125,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana // // Add all the applicable files for the current project // - val buildDir = buildDir(project) + val buildDir = KFiles.buildDir(project) val allFiles = arrayListOf() val classesDir = KFiles.makeDir(buildDir.path, "classes") @@ -189,8 +189,6 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana true /* expandJarFiles */, jarFactory) } - private fun buildDir(project: Project) = KFiles.makeDir(project.directory, project.buildDirectory) - private fun findIncludedFiles(directory: String, files: List, excludes: List) : List { val result = arrayListOf()