Skip to content

Commit

Permalink
fix: Made ModMetadata and ModDependency serializable for gradle task …
Browse files Browse the repository at this point in the history
…input compatibility
  • Loading branch information
phinner committed Jun 11, 2024
1 parent 1e5d7f3 commit 841e6b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/kotlin/com/xpdustry/toxopid/spec/ModDependency.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
*/
package com.xpdustry.toxopid.spec

import java.io.Serializable

/**
* Represents a mod dependency.
*/
public data class ModDependency(
val name: String,
val soft: Boolean = false,
)
) : Serializable
3 changes: 2 additions & 1 deletion src/main/kotlin/com/xpdustry/toxopid/spec/ModMetadata.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import org.hjson.JsonArray
import org.hjson.JsonObject
import org.hjson.Stringify
import java.io.File
import java.io.Serializable

/**
* Represents the metadata of a mod.
Expand All @@ -50,7 +51,7 @@ public data class ModMetadata(
public var textureScale: Float = 1f,
public var pregenerated: Boolean = false,
public val dependencies: MutableList<ModDependency> = mutableListOf(),
) {
) : Serializable {
public companion object {
/**
* @return a parsed [ModMetadata] from json
Expand Down

0 comments on commit 841e6b3

Please sign in to comment.