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

com.dipien.byebyejetifier.common.AbstractTask.kt Maven / Gradle / Ivy

There is a newer version: 1.2.2
Show newest version
package com.dipien.byebyejetifier.common

import com.dipien.byebyejetifier.ByeByeJetifierGradlePlugin
import com.dipien.byebyejetifier.ByeByeJetifierExtension
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction

abstract class AbstractTask : DefaultTask() {

    @get:Input
    var verbose = false

    @TaskAction
    fun doExecute() {

        LoggerHelper.logger = logger
        LoggerHelper.verbose = verbose

        onExecute()
    }

    @Internal
    protected fun getExtension(): ByeByeJetifierExtension {
        return project.extensions.getByName(ByeByeJetifierGradlePlugin.EXTENSION_NAME) as ByeByeJetifierExtension
    }

    protected abstract fun onExecute()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy