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

commonMain.co.touchlab.skie.plugin.shim.SkieLoaderError.kt Maven / Gradle / Ivy

There is a newer version: 0.9.0-RC.5
Show newest version
package co.touchlab.skie.plugin.shim

import co.touchlab.skie.plugin.configuration.skieExtension
import org.gradle.api.Project

fun Project.reportSkieLoaderError(error: String) {
    afterEvaluate {
        // Intentionally not checking for the macOS platform
        val isSkieSupposedToBeEnabled = skieExtension.isEnabled.get()

        if (isSkieSupposedToBeEnabled) {
            val errorMessage = """
                    |Error: ${error.replace("\n", "\n|")}
                    |SKIE cannot not be used until this error is resolved.
                    |To proceed with the compilation, please remove or explicitly disable SKIE by adding 'skie { isEnabled = false }' to your Gradle configuration.
                """.trimMargin()

            error(errorMessage)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy