Exporting a modpack is now controlled by a list of rules which control what should happen with the content you want to export/package.
These rules can be written in many ways and are fully extensible by extending the RuleContext class.
To create an export rule, you simply implement the functional interface like this:
fun exampleRule() = ExportRule {
when (it)
{
is ExportingProject -> it.export() // (Sample function)
else -> it.ignore()
}
}
Export rules must be part of an ExportProfile to be executed.
Export Profiles
An export profile is used to contain the above-mentioned list of rules.
Each export profile is independent of each other and will result in one exported file.
ExportProfile(
name = "example-profile",
rules = listOf(
exampleRule()
)
)
An export profile can be exported using the ExportProfile.export() extension function.
Multiple export profiles can be exported asynchronously when used as a parameter in the export() function.
Export Rules
Exporting a modpack is now controlled by a list of rules which control what should happen with the content you want to export/package.
These rules can be written in many ways and are fully extensible by extending the
RuleContext
class.To create an export rule, you simply implement the functional interface like this:
Export rules must be part of an
ExportProfile
to be executed.Export Profiles
An export profile is used to contain the above-mentioned list of rules. Each export profile is independent of each other and will result in one exported file.
An export profile can be exported using the
ExportProfile.export()
extension function. Multiple export profiles can be exported asynchronously when used as a parameter in theexport()
function.