All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.squirrelgrip.build.common.model.ProjectProfile.kt Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.github.squirrelgrip.build.common.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
data class ProjectProfile(
    val project: Project,
    val status: Status = Status()
) {
    val mojoProfiles: MutableList = mutableListOf()

    fun addMojoProfile(mojoProfile: MojoProfile) {
        mojoProfiles.add(mojoProfile)
    }

    fun getMojoProfile(mojo: Mojo, executionId: String, goal: String): MojoProfile =
        mojoProfiles.first {
            it.mojo == mojo
                && it.executionId == executionId
                && it.goal == goal
        }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy