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

No longer used

This commit is contained in:
Cedric Beust 2017-03-27 15:19:10 -07:00
parent 148a75d994
commit b3585f48cb

View file

@ -1,29 +0,0 @@
package com.beust.kobalt.app.remote
import com.beust.kobalt.Args
import com.beust.kobalt.api.Project
import com.beust.kobalt.internal.remote.ICommand
import com.beust.kobalt.internal.remote.ICommandSender
import com.google.gson.Gson
import com.google.gson.JsonObject
import javax.inject.Inject
/**
* This command returns the list of dependencies for the given buildFile.
* Payload:
* { "name" : "getDependencies", "buildFile": "/Users/beust/kotlin/kobalt/kobalt/src/Build.kt" }
* The response is a GetDependenciesData.
*/
@Deprecated(message = "Only used by old server, to be deleted")
class GetDependenciesCommand @Inject constructor(val args: Args, val dependencyData: RemoteDependencyData) : ICommand {
override val name = "getDependencies"
override fun run(sender: ICommandSender, received: JsonObject, initCallback: (String) -> List<Project>) {
val buildFile = received.get("buildFile").asString
val projects = initCallback(buildFile)
val dd = dependencyData.dependenciesDataFor(buildFile, args)
val data = toCommandData(Gson().toJson(dd), dd.errorMessage)
sender.sendData(data)
}
}