@@ -4,9 +4,6 @@ import io.github.rothes.esu.core.EsuCore
44import io.github.rothes.esu.core.configuration.ConfigLoader
55import io.github.rothes.esu.core.configuration.ConfigurationPart
66import 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
107import java.net.URLConnection
118import java.nio.file.Path
129import 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