Skip to content

MerlinTHS/KavaCompilerPlugin

Repository files navigation

Kava Compiler Plugin

A Kotlin compiler plugin to simplify development with Kava. It ships with a Gradle-Plugin to integrate it into your project and an IntelliJ-Plugin to gain better IDE - assistance.

The Gradle-Plugin does currently only a few things:

  • Adding dependencies to your JVM - compilations
  • Configuring the annotation processor as well as the generated source directories of it
  • Wrapping the KSP options into a typesafe gradle extension
  • Enabling support for Context Receivers, which is required for using Kava.

See Demo.

Getting Started

The plugin is hosted on the Gradle Plugin Portal. Simply apply it in your build.gradle.kts.

plugins {
    id("io.github.merlinths.kava") version "1.0.0"
}

Now you can configure Kavas Annotation Processor options in a typesafe manner.

kava {
    processor {
        generatedFiles = GeneratedFiles.Separate(
            packageName = GeneratedPackage.Infer,
            fileExtension = GeneratedFileExtension.Static("Extensions")
        )
    }
}

Supported Platforms

Kavas gradle-plugin can be added to any kotlin project, but will only be applied on

  • JVM compilations
  • Android (JVM) compilations

Versioning

Since it's a compiler plugin, its implementation is tightly coupled to a specific compiler version.

Kotlin Compiler Kava Plugin
1.8.0 1.0.0

About

Kotlin Compiler Plugin for Kava

Topics

Resources

Stars

Watchers

Forks

Languages