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

ru.astrainteractive.gradleplugin.processor.plugin.ResourceProcessorScope.kt Maven / Gradle / Ivy

The newest version!
package ru.astrainteractive.gradleplugin.processor.plugin

import org.gradle.api.Project
import org.gradle.kotlin.dsl.named
import org.gradle.language.jvm.tasks.ProcessResources
import ru.astrainteractive.gradleplugin.processor.platform.BukkitResourceProcessor
import ru.astrainteractive.gradleplugin.processor.platform.FabricResourceProcessor
import ru.astrainteractive.gradleplugin.processor.platform.ForgeResourceProcessor
import ru.astrainteractive.gradleplugin.processor.platform.VelocityResourceProcessor

open class ResourceProcessorScope(private val project: Project) {
    val task = project.tasks.named("processResources")

    fun bukkit(
        customProperties: Map = emptyMap(),
        configuration: ProcessResources.() -> Unit = {}
    ) = BukkitResourceProcessor(project).process(customProperties, configuration)

    fun velocity(
        customProperties: Map = emptyMap(),
        configuration: ProcessResources.() -> Unit = {}
    ) = VelocityResourceProcessor(project).process(customProperties, configuration)

    fun fabric(
        customProperties: Map = emptyMap(),
        configuration: ProcessResources.() -> Unit = {}
    ) = FabricResourceProcessor(project).process(customProperties, configuration)

    fun forge(
        customProperties: Map = emptyMap(),
        configuration: ProcessResources.() -> Unit = {}
    ) = ForgeResourceProcessor(project).process(customProperties, configuration)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy