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

WARNING: Module 'com.github.bumptech.glide:glide:4.1.0' depends on one or more Android Libraries but is a jar #2318

Closed
jaredsburrows opened this issue Sep 1, 2017 · 18 comments
Labels
Milestone

Comments

@jaredsburrows
Copy link
Contributor

Repro:

  • Upgrade to 4.1.0
  • gradlew assembleDebug

Warning output:

WARNING: Module 'com.github.bumptech.glide:glide:4.1.0' depends on one or more Android Libraries but is a jar
WARNING: Module 'com.github.bumptech.glide:glide:4.1.0' depends on one or more Android Libraries but is a jar
WARNING: Module 'com.github.bumptech.glide:glide:4.1.0' depends on one or more Android Libraries but is a jar
WARNING: Module 'com.github.bumptech.glide:glide:4.1.0' depends on one or more Android Libraries but is a jar
@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Sep 1, 2017

You can slap a qualifier on the dependency, I think: ...:4.1.0@aar

@jaredsburrows
Copy link
Contributor Author

Thanks. com.github.bumptech.glide:glide:4.1.0@aar works and removes the warning. I made a PR to update the README.md here: #2319.

@TWiStErRob
Copy link
Collaborator

I wonder what conditions bring this up. I don't remember having this problem before.

@sjudd maybe there's no point publishing the jar any more. I guess before AAR wasn't widely supported, and the JAR artifact is a legacy of that?

@jaredsburrows
Copy link
Contributor Author

Looks like it. AAR comes from: https://github.com/bumptech/glide/blob/master/library/build.gradle and its "main" package is the JAR: https://github.com/bumptech/glide/blob/master/glide/gradle.properties#L3.

We should just publish the project as an AAR.

@talklittle
Copy link

It needs to be:

compile('com.github.bumptech.glide:glide:4.1.0@aar') {
    transitive = true;
}

Need the transitive = true; otherwise it won't pull in the annotations module which contains @GlideModule.

@sjudd
Copy link
Collaborator

sjudd commented Sep 2, 2017

The aar dependency is probably the new componentized support libraries. I can probably just revert that for the next version. It's not a big deal to publish as AAR though. It would fix the view id conflict with ViewTarget.

The reason it's published as a jar is simplicity (not so much of an issue now that everything is using gradle) and because aars didn't used to be supported.

What's more convenient for everyone?

@TWiStErRob
Copy link
Collaborator

Aah, I remember now. I think we can keep using JAR published, but support-fragment probably needs to change from compile to provided. That may solve the issue of this warning as well as downgrading the support version.

This may require the new (3.x) Gradle plugin to actually work, long time since played around.

@TWiStErRob
Copy link
Collaborator

As far as I remember, an AAR library depending on another AAR with compile repackages everything, so the merger takes a lot of time, that's why provided works well.

@sjudd sjudd added the bug label Sep 4, 2017
@sjudd sjudd closed this as completed in 789161a Sep 4, 2017
@sjudd
Copy link
Collaborator

sjudd commented Sep 4, 2017

I believe this is fixed, if someone can verify using the Snapshot, I'd appreciate it.

@sjudd sjudd added this to the 4.1.1 milestone Sep 4, 2017
@jaredsburrows
Copy link
Contributor Author

@sjudd Thanks. The 4.2.0-SNAPSHOT works!

@TWiStErRob
Copy link
Collaborator

@jaredsburrows I guess you just noticed the repositories ;)

@jaredsburrows
Copy link
Contributor Author

@TWiStErRob I saw the sjudd added this to the 4.1.1 milestone. So assumed 4.1.1-SNAPSHOT since 4.1.0 release is out. So I just manually made sure I had the latest Snapshot: 4.2.0-SNAPSHOT.

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Sep 4, 2017

Ah, tricky versions... thanks for checking!

@kumarbanty
Copy link

I am facing the same issue in version 4.4.0. Should I downgrade to some lower version?

@sjudd
Copy link
Collaborator

sjudd commented Dec 6, 2017

Ugh yeah I meant to change this to aar.

Does this actually break? Or just warn?

@sjudd sjudd modified the milestones: 4.1.1, 4.4 Dec 6, 2017
@sjudd sjudd reopened this Dec 6, 2017
@sjudd
Copy link
Collaborator

sjudd commented Dec 6, 2017

Actually this is already done: https://github.com/bumptech/glide/blob/b4b45791cca6b72345a540dcaa71a358f5706276/library/gradle.properties.

Do all AAR libraries require you to specify @aar? Or more likely this is insufficient.

@sjudd
Copy link
Collaborator

sjudd commented Dec 6, 2017

@sjudd
Copy link
Collaborator

sjudd commented Dec 6, 2017

Huh and I actually don't see the warning at all in a sample project: https://github.com/sjudd/Base64ModelLoaderExample.

I did find a way to get packaging into the pom, but unless someone tells me this breaks something, we'll fix in in 4.5

@sjudd sjudd removed this from the 4.4 milestone Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants