Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't work for library modules #43

Open
zhizhangchen opened this issue Jun 15, 2017 · 5 comments
Open

Plugin doesn't work for library modules #43

zhizhangchen opened this issue Jun 15, 2017 · 5 comments

Comments

@zhizhangchen
Copy link

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

@zhizhangchen zhizhangchen changed the title Plugin doesn't work for library module Plugin doesn't work for library modules Jun 15, 2017
@orhanobut orhanobut added this to the 2.1.0 milestone Jun 16, 2017
@Kolyall
Copy link
Contributor

Kolyall commented Aug 23, 2018

@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
Copy link
Owner

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
Copy link

srikgn commented Jul 19, 2019

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

@Kolyall
Copy link
Contributor

Kolyall commented Jun 5, 2020

@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
Copy link
Contributor

Kolyall commented Jun 5, 2020

fixed in #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants