Skip to content

Commit c5dad02

Browse files
committed
Cleanup removed nodes
1 parent 1b5e74f commit c5dad02

File tree

1 file changed

+0
-35
lines changed
  • core/src/main/kotlin/io/github/rothes/esu/core/config

1 file changed

+0
-35
lines changed

core/src/main/kotlin/io/github/rothes/esu/core/config/EsuConfig.kt

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import io.github.rothes.esu.core.EsuCore
44
import io.github.rothes.esu.core.configuration.ConfigLoader
55
import io.github.rothes.esu.core.configuration.ConfigurationPart
66
import io.github.rothes.esu.core.configuration.meta.Comment
7-
import io.github.rothes.esu.core.configuration.meta.RemovedNode
8-
import io.github.rothes.esu.lib.configurate.objectmapping.meta.PostProcess
9-
import io.github.rothes.esu.lib.configurate.objectmapping.meta.Setting
107
import java.net.URLConnection
118
import java.nio.file.Path
129
import java.util.*
@@ -66,10 +63,6 @@ object EsuConfig {
6663
val disableJarFileCache: Boolean = false,
6764
): ConfigurationPart {
6865

69-
@field:Setting("maven-repository")
70-
@RemovedNode("0.11.0")
71-
private var mavenRepoInternal: Unit = Unit
72-
7366
data class Database(
7467
@Comment("""
7568
The database software you want to use.
@@ -102,34 +95,6 @@ object EsuConfig {
10295
else -> error("Unsupported database type: $databaseType")
10396
}
10497

105-
@RemovedNode("0.9.1")
106-
val jdbcDriver: String? = null
107-
@RemovedNode("0.9.1")
108-
val jdbcUrl: String? = null
109-
110-
@PostProcess
111-
private fun upgrade() {
112-
if (jdbcUrl != null) {
113-
val split = jdbcUrl.split(':', limit = 3)
114-
if (split.size < 3) return
115-
when (split[1]) {
116-
"h2" -> {
117-
databaseType = "H2"
118-
}
119-
"mysql",
120-
"mariadb" -> {
121-
databaseType = split[1].uppercase()
122-
val reg = "//(.+):(.+)/(.+)".toRegex().matchEntire(split[2])
123-
if (reg != null) {
124-
host = reg.groups[1]?.value ?: host
125-
port = reg.groups[2]?.value?.toIntOrNull() ?: port
126-
database = reg.groups[3]?.value ?: database
127-
}
128-
}
129-
}
130-
}
131-
}
132-
13398
}
13499
}
135100
}

0 commit comments

Comments
 (0)