orhanobut / tracklytics

✔️ Annotation based tracking handler with aspect oriented programming
Apache License 2.0
429 stars 45 forks source link

The plugin doent work with kotlin files #50

Open Kolyall opened 4 years ago

Kolyall commented 4 years ago

The plugin doent work with kotlin files

Kolyall commented 4 years ago

for example:

  findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {

      @TrackEvent("button_click")
      @FixedAttribute(key = "button_name", value = "Login")
      @Override public void onClick(View v) {
              new KotlinObject().track();
              new JavaObject().track();
        }
    });
class KotlinObject {
    @TrackEvent("event_kotlin_object")
    fun track() {
    }
}

Log: no any event

Kolyall commented 4 years ago

but java class works:

class JavaObject {
    @TrackEvent("event_java_object")
    void track() {
    }
}

Log:

2020-06-05 17:10:21.868 12772-12772/com.orhanobut.sample D/Tracker: event_java_object-> {}, super attrs: {}, filters: []
Kolyall commented 4 years ago

fixed in https://github.com/orhanobut/tracklytics/pull/49