mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
No longer used
This commit is contained in:
parent
148a75d994
commit
b3585f48cb
1 changed files with 0 additions and 29 deletions
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue