Skip to content

Commit

Permalink
force using java 21 + added mode prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoMarlir committed May 24, 2024
1 parent 13a22c6 commit b61004c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions node/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ tasks.shadowJar {
)
)
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
8 changes: 5 additions & 3 deletions node/src/main/kotlin/me/blueamethyst/bluecloud/node/Node.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import me.blueamethyst.bluecloud.node.utils.generateRandomSecret
import me.blueamethyst.bluecloud.node.utils.json
import me.blueamethyst.bluecloud.wrapper.Wrapper
import java.io.File
import java.util.*
import kotlin.system.exitProcess

@InternalBlueCloudApi
class Node: AbstractSystemPart(InternalSystemPartType.NODE) {
Expand Down Expand Up @@ -71,10 +73,10 @@ class Node: AbstractSystemPart(InternalSystemPartType.NODE) {
name = "node.json",
content = {
NodeConfigModel(
id = "",
name = "",
id = UUID.randomUUID().toString(),
name = terminal.terminal.prompt("What is the name of this node?", "Node-1", true) ?: exitProcess(-1),
internalWrapperEnabled = true,
otherNodes = emptyList()
otherNodes = terminal.terminal.prompt("What are the other nodes in the cluster? (seperate with ;)")?.split(";")?.map { it.trim() } ?: emptyList()
)
}
)
Expand Down

0 comments on commit b61004c

Please sign in to comment.