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

Move buildDir to KFiles.

This commit is contained in:
Cedric Beust 2015-12-13 08:55:01 -08:00
parent 457de8de34
commit 421a5a6d4a
2 changed files with 4 additions and 4 deletions

View file

@ -66,6 +66,8 @@ class KFiles {
KFiles.joinDir(project.directory, project.buildDirectory, "generated", "source", name, KFiles.joinDir(project.directory, project.buildDirectory, "generated", "source", name,
variant.toIntermediateDir()) variant.toIntermediateDir())
fun buildDir(project: Project) = KFiles.makeDir(project.directory, project.buildDirectory)
/** /**
* Join the paths elements with the file separator. * Join the paths elements with the file separator.
*/ */

View file

@ -60,7 +60,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
runTask = { taskAssemble(project) }) 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", @Task(name = TASK_ASSEMBLE, description = "Package the artifacts",
runAfter = arrayOf(JvmCompilerPlugin.TASK_COMPILE)) 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 // Add all the applicable files for the current project
// //
val buildDir = buildDir(project) val buildDir = KFiles.buildDir(project)
val allFiles = arrayListOf<IncludedFile>() val allFiles = arrayListOf<IncludedFile>()
val classesDir = KFiles.makeDir(buildDir.path, "classes") val classesDir = KFiles.makeDir(buildDir.path, "classes")
@ -189,8 +189,6 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
true /* expandJarFiles */, jarFactory) true /* expandJarFiles */, jarFactory)
} }
private fun buildDir(project: Project) = KFiles.makeDir(project.directory, project.buildDirectory)
private fun findIncludedFiles(directory: String, files: List<IncludedFile>, excludes: List<IFileSpec.Glob>) private fun findIncludedFiles(directory: String, files: List<IncludedFile>, excludes: List<IFileSpec.Glob>)
: List<IncludedFile> { : List<IncludedFile> {
val result = arrayListOf<IncludedFile>() val result = arrayListOf<IncludedFile>()