Project

data class Project(var pakkuId: String? = null, val pakkuLinks: MutableSet<String> = mutableSetOf(), var type: ProjectType, var side: ProjectSide? = null, val slug: MutableMap<String, String>, val name: MutableMap<String, String>, val id: MutableMap<String, String>, var updateStrategy: UpdateStrategy = UpdateStrategy.LATEST, var redistributable: Boolean = true, subpath: String? = null, var aliases: MutableSet<String>? = null, var export: Boolean? = null, var files: MutableSet<ProjectFile>)

Represents a project. (E.g. a mod, resource pack, shader, etc.)

Constructors

Link copied to clipboard
constructor(pakkuId: String? = null, pakkuLinks: MutableSet<String> = mutableSetOf(), type: ProjectType, side: ProjectSide? = null, slug: MutableMap<String, String>, name: MutableMap<String, String>, id: MutableMap<String, String>, updateStrategy: UpdateStrategy = UpdateStrategy.LATEST, redistributable: Boolean = true, subpath: String? = null, aliases: MutableSet<String>? = null, export: Boolean? = null, files: MutableSet<ProjectFile>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Mutable set of associated files.

Link copied to clipboard

Mutable map of platform name to id.

Link copied to clipboard

Mutable map of platform name to project name.

Link copied to clipboard

Pakku ID. Randomly generated and assigned when adding this project.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The side required by this project. Defaults to ProjectSide.BOTH.

Link copied to clipboard

Mutable map of platform name to project slug, a short and lowercase version of the name.

Link copied to clipboard

The type of the project. (E.g. a mod, resource pack, shader, etc.)

Link copied to clipboard

Functions

Link copied to clipboard
operator fun contains(input: String): Boolean

Checks if the current project contains the specified string in its slugs, names, IDs or aliases.

Link copied to clipboard
suspend fun Project?.createAdditionRequest(onError: suspend (error: ActionError) -> Unit, onSuccess: suspend (project: Project, isRecommended: Boolean, replacing: Project?, reqHandlers: RequestHandlers) -> Unit, lockFile: LockFile, platforms: List<Platform>, strict: Boolean = false)
Link copied to clipboard
suspend fun Project?.createRemovalRequest(onError: suspend (error: ActionError) -> Unit, onRemoval: suspend (project: Project, isRecommended: Boolean) -> Unit, onDepRemoval: suspend (project: Project, isRecommended: Boolean) -> Unit, lockFile: LockFile)
Link copied to clipboard

Retrieves a list of project files associated with the specified platform.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Project.getFlavoredName(theme: <Error class: unknown class>, maxLength: Int? = 20): String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Project.getFlavoredUpdateMsg(theme: <Error class: unknown class>, updatedProjects: MutableSet<Project>): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getPathStringWithSubpath(configFile: ConfigFile?, separator: Char = '/'): <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getSubpath(): <Error class: unknown class><String, ActionError>?
Link copied to clipboard
Link copied to clipboard
infix fun hasAliasOf(other: Project): Boolean

Check if the current project has an alias of the specified project.

Link copied to clipboard

Checks if the project has any files.

Link copied to clipboard
fun hasFilesOn(provider: Provider): Boolean

Checks if the project has files on the specified provider.

Link copied to clipboard

Checks if the project has files on the specified platform.

Link copied to clipboard

Checks if the project has no files.

Link copied to clipboard
fun hasNoFilesOn(provider: Provider): Boolean

Checks if the project has no files on the specified provider.

Link copied to clipboard

Checks if the project has no files on the specified platform.

Link copied to clipboard
Link copied to clipboard
infix fun isAlmostTheSameAs(other: Project): Boolean

Checks if the current project contains at least one slug, ID or name from the other project.

Link copied to clipboard

Checks if the project is not associated with the specified platform.

Link copied to clipboard
fun isOnPlatform(platform: Platform): Boolean

Checks if the project is associated with the specified platform.

Link copied to clipboard
operator fun plus(other: Project): <Error class: unknown class><Project, ActionError>

Combines two projects of the same type into a new project.

Link copied to clipboard
suspend fun requestDependencies(projectProvider: Provider, lockFile: LockFile): List<<Error class: unknown class><Project, ActionError>>

Requests projects with files for all dependencies of this project.

Link copied to clipboard
suspend fun Project.resolveDependencies(terminal: <Error class: unknown class>, reqHandlers: RequestHandlers, lockFile: LockFile, projectProvider: Provider, platforms: List<Platform>, onDependencyReq: suspend (project: Project, provider: Provider, lockfile: LockFile) -> List<<Error class: unknown class><Project, ActionError>> = { project, provider, _ -> project.requestDependencies(provider, lockFile) })
Link copied to clipboard
fun setSubpath(subpath: String): ActionError?
Link copied to clipboard

Checks if versions do not match across specified providers.

Link copied to clipboard

Checks if versions match across specified providers.