Skip to content

kevinmost/debuglog

Repository files navigation

DebugLog: An exploratory Compiler Plugin for Kotlin

This repository contains a Kotlin Compiler Plugin that automagically adds method tracing (to stdout) to any function annotated with a user-specified "DebugLog" annotation.

Currently, there are many bugs in this code, as it was a toy project made specifically for a talk I gave on Kotlin Compiler plugins at KotlinConf (video here, slides here, talk abstract here).

Usage

Build the artifacts for both the :gradle-plugin and :kotlin-plugin modules, and publish them to a Maven repo.

Add a dependency on the :gradle-plugin artifact to your root build.gradle:

buildscript {
  dependencies {
    classpath "debuglog:gradle-plugin:0.0.1"
  }
}

and then in your module-specific build.gradle, apply/configure the plugin:

apply plugin: "debuglog.plugin"

debugLog {
  enabled = true
  annotations = [ "com.sample.myapp.annotations.DebugLog" ]
}

Bugs

You tell me!

About

An exploratory 3rd-party Kotlin Compiler Plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages