Skip to content

Commit

Permalink
fix serialization conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkyAI committed Mar 13, 2021
1 parent ef7c0c9 commit f7fbb3d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions voodoo/src/main/kotlin/voodoo/pack/FileEntry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import voodoo.data.flat.FlatEntry
@Serializable
sealed class FileEntry(
) {
companion object {
private val logger = KotlinLogging.logger{}
}
private val logger = KotlinLogging.logger{}

interface Common {
val applyOverrides: List<String>
Expand Down Expand Up @@ -158,8 +156,6 @@ sealed class FileEntry(
override var validMcVersions: Set<String> = CommonComponent.DEFAULT.validMcVersions,
override var invalidMcVersions: Set<String> = CommonComponent.DEFAULT.invalidMcVersions,
) : Common, FileEntry() {
@JsonSchema.StringEnum(["curse"])
private val type = "curse"
override fun id() = id.takeUnless { it.isNullOrBlank() } ?: curse_projectName?.substringAfterLast('/')
override fun applyOverride(override: EntryOverride): Curse {
return when (override) {
Expand Down Expand Up @@ -222,8 +218,6 @@ sealed class FileEntry(
override var validMcVersions: Set<String> = CommonComponent.DEFAULT.validMcVersions,
override var invalidMcVersions: Set<String> = CommonComponent.DEFAULT.invalidMcVersions,
) : Common, FileEntry() {
@JsonSchema.StringEnum(["direct"])
private val type = "direct"
override fun id() = id.takeUnless { it.isNullOrBlank() } ?: direct_url.split(":|&|=".toRegex()).joinToString("_")
override fun applyOverride(override: EntryOverride): Direct {
return when (override) {
Expand Down Expand Up @@ -280,8 +274,6 @@ sealed class FileEntry(
override var validMcVersions: Set<String> = CommonComponent.DEFAULT.validMcVersions,
override var invalidMcVersions: Set<String> = CommonComponent.DEFAULT.invalidMcVersions,
) : Common, FileEntry() {
@JsonSchema.StringEnum(["jenkins"])
private val type = "jenkins"
override fun id() = id.takeUnless { it.isNullOrBlank() } ?: jenkins_job
override fun applyOverride(override: EntryOverride): Jenkins {
return when (override) {
Expand Down Expand Up @@ -339,8 +331,6 @@ sealed class FileEntry(
override var validMcVersions: Set<String> = CommonComponent.DEFAULT.validMcVersions,
override var invalidMcVersions: Set<String> = CommonComponent.DEFAULT.invalidMcVersions,
) : Common, FileEntry() {
@JsonSchema.StringEnum(["local"])
private val type = "local"
override fun id() = id.takeUnless { it.isNullOrBlank() } ?: local_fileSrc
override fun applyOverride(override: EntryOverride): Local {
return when (override) {
Expand Down

0 comments on commit f7fbb3d

Please sign in to comment.