mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Skip install if there's nothing to install.
This commit is contained in:
parent
c98d6e4311
commit
0118e71b4f
1 changed files with 5 additions and 6 deletions
|
@ -264,15 +264,14 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
|
|||
@Task(name = PackagingPlugin.TASK_INSTALL, description = "Install the artifacts",
|
||||
runAfter = arrayOf(PackagingPlugin.TASK_ASSEMBLE))
|
||||
fun taskInstall(project: Project) : TaskResult {
|
||||
val config = configurationFor(project)
|
||||
if (config != null) {
|
||||
val buildDir = project.projectProperties.getString(LIBS_DIR)
|
||||
val config = configurationFor(project) ?: InstallConfig()
|
||||
val buildDir = project.projectProperties.getString(LIBS_DIR)
|
||||
val buildDirFile = File(buildDir)
|
||||
if (buildDirFile.exists()) {
|
||||
log(1, "Installing from $buildDir to ${config.libDir}")
|
||||
|
||||
val toDir = KFiles.makeDir(config.libDir)
|
||||
KFiles.copyRecursively(File(buildDir), toDir)
|
||||
} else {
|
||||
log(1, "No install specified for ${project.name}, nothing to do")
|
||||
KFiles.copyRecursively(buildDirFile, toDir)
|
||||
}
|
||||
|
||||
return TaskResult()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue