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

dev.mokkery.plugin.MokkeryIrGenerationExtension.kt Maven / Gradle / Ivy

Go to download

Mokkery is a mocking library for Kotlin Multiplatform, easy to use, boilerplate-free and compiler plugin driven.

The newest version!
package dev.mokkery.plugin

import dev.mokkery.plugin.core.CompilerPluginScope
import dev.mokkery.plugin.transformers.MokkeryTransformer
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.ir.declarations.IrModuleFragment

class MokkeryIrGenerationExtension(
    private val config: CompilerConfiguration,
) : IrGenerationExtension {

    override fun generate(moduleFragment: IrModuleFragment, pluginContext: IrPluginContext) {
        MokkeryTransformer(CompilerPluginScope(config, pluginContext))
            .visitModuleFragment(moduleFragment)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy