mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Optimize splits.
This commit is contained in:
parent
9bb3b11128
commit
160cbbcfda
7 changed files with 11 additions and 11 deletions
|
@ -73,10 +73,10 @@ private class Main @Inject constructor(
|
|||
val dependencies = arrayListOf<IClasspathDependency>()
|
||||
args.pluginIds?.let {
|
||||
// We want this call to go to the network if no version was specified, so set localFirst to false
|
||||
dependencies.addAll(it.split(",").map { dependencyManager.create(it) })
|
||||
dependencies.addAll(it.split(',').map { dependencyManager.create(it) })
|
||||
}
|
||||
args.pluginJarFiles?.let {
|
||||
dependencies.addAll(it.split(",").map { FileDependency(it) })
|
||||
dependencies.addAll(it.split(',').map { FileDependency(it) })
|
||||
}
|
||||
if (dependencies.size > 0) {
|
||||
val urls = dependencies.map { it.jarFile.get().toURI().toURL() }
|
||||
|
@ -187,7 +187,7 @@ private class Main @Inject constructor(
|
|||
}
|
||||
} else if (args.dependencies != null) {
|
||||
// --resolve
|
||||
resolveDependency.run(args.dependencies!!.split(",").toList())
|
||||
resolveDependency.run(args.dependencies!!.split(',').toList())
|
||||
} else if (args.tasks) {
|
||||
// --tasks
|
||||
displayTasks()
|
||||
|
|
|
@ -21,7 +21,7 @@ class ProjectGenerator @Inject constructor(val pluginInfo: PluginInfo){
|
|||
}
|
||||
}
|
||||
|
||||
args.templates?.split(",")?.forEach { templateName ->
|
||||
args.templates?.split(',')?.forEach { templateName ->
|
||||
val template = map[templateName]
|
||||
if (template != null) {
|
||||
log(2, "Running template $templateName")
|
||||
|
|
|
@ -73,7 +73,7 @@ class KobaltServer @Inject constructor(@Assisted val force: Boolean, @Assisted @
|
|||
return false
|
||||
} else {
|
||||
val processName = ManagementFactory.getRuntimeMXBean().name
|
||||
val pid = processName.split("@")[0]
|
||||
val pid = processName.split('@')[0]
|
||||
Properties().apply {
|
||||
put(KEY_PORT, port.toString())
|
||||
put(KEY_PID, pid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue