orhanobut / tracklytics

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

Plugin doesn't work for library modules #43

Open zhizhangchen opened 7 years ago

zhizhangchen commented 7 years ago

Error:(3, 0) Could not get unknown property 'applicationVariants' for object of type com.android.build.gradle.LibraryExtension. Open File

Kolyall commented 6 years ago

@orhanobut Library module/build.gradle file looks like this:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.orhanobut.tracklytics:tracklytics-plugin:2.0.0'
    }
}
apply plugin: 'com.android.library'
apply plugin: 'com.orhanobut.tracklytics'

Error is:

> Failed to apply plugin [id 'com.orhanobut.tracklytics']
   > Could not get unknown property 'applicationVariants' for object of type com.android.build.gradle.LibraryExtension.
orhanobut commented 6 years ago

It's an old issue that I haven't take a look unfortunately. Let me see if I can fix this in this weekend. I'll spend some time on it.

srikgn commented 5 years ago

facing the same issue ERROR: Could not get unknown property 'applicationVariants' for object of type com.android.build.gradle.LibraryExtension. Open File

Kolyall commented 4 years ago

@orhanobut is any way to review the issue?

I tried to add the lib to the module like:

implementation "com.orhanobut.tracklytics:tracklytics-runtime:2.1.0"

But in result the plugin doesn't see annotations in the module

Could you make the lib like annotationProcessor?

Kolyall commented 4 years ago

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