A Kotlin Compiler Plugin (Not Gradle Transform Plugin) that helps Android-Kotlin developers to automatically output method call information through annotations.
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "com.github.succlz123.naix:gradle-plugin:x.y.z"
}
apply plugin: 'com.github.succlz123.naix'
implementation "com.github.succlz123.naix:compiler-runtime:x.y.z"
naix {
enable = false
}
NaixOption.set { className, methodName, msg -> Log.i("Naix ", msg) }
@Naix
fun func1(a: String?, b: String?, c: Double?): String {
retrun "test"
}
↓
╔══════════════════════════════════════════════════════════════════════════════╗
║ Class#Method -> org/succlz123/naix/app/MainActivity#func1 ║
║ Parameters -> a = 123 b = test c = 1.2 ║
║ Return value -> test ║
║ Elapsed time -> 0 ms ║
╚══════════════════════════════════════════════════════════════════════════════╝
@NaixFull
fun func2(a: String?, b: String?, c: Long): String {
...... // some method call
retrun "test2"
}
↓
╔══════════════════════════════════════════════════════════════════════════════╗
║ Class#Method -> org/succlz123/naix/app/MainActivity#func2 ║
║ Parameters -> a = 321 b = tset c = 2.1 ║
║ 1 -> 1 ms, kotlin/jvm/internal/Intrinsics#areEqual ║
║ 2 -> 0 ms, java/util/ArrayList#<init> ║
║ 3 -> 0 ms, org/succlz123/naix/app/MainActivity#funcTest ║
║ 4 -> 0 ms, java/util/ArrayList#<init> ║
║ 5 -> 0 ms, java/util/ArrayList#add ║
║ Return value -> test2 ║
║ Elapsed time -> 1 ms ║
╚══════════════════════════════════════════════════════════════════════════════╝