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

2.25 compiler jar missing shaded dependency classes #1639

Closed
trevjonez opened this issue Oct 22, 2019 · 7 comments
Closed

2.25 compiler jar missing shaded dependency classes #1639

trevjonez opened this issue Oct 22, 2019 · 7 comments
Assignees

Comments

@trevjonez
Copy link

After updating to use 2.25 running in a gradle build via kapt I am seeing:

java.lang.NoClassDefFoundError: dagger/shaded/auto/common/BasicAnnotationProcessor

A quick download of the sources jar shows they are missing there as well. (assuming they should have been included)

@vRallev
Copy link

vRallev commented Oct 22, 2019

Looks more like an issue in the pom file: https://search.maven.org/artifact/com.google.dagger/dagger-compiler/2.25/jar

<dependency>
  <groupId>com.google.dagger</groupId>
  <artifactId>dagger-producers</artifactId>
  <version>${project.version}</version>
</dependency>
<dependency>
  <groupId>com.google.dagger</groupId>
  <artifactId>dagger-spi</artifactId>
<!-- NOTICE THIS VERSION -->
  <version>${project.version}</version>
</dependency>
<dependency>
  <groupId>com.google.googlejavaformat</groupId>
  <artifactId>google-java-format</artifactId>
  <version>1.5</version>
</dependency>

@JakeWharton
Copy link

What's wrong with that version?

@vRallev
Copy link

vRallev commented Oct 22, 2019

Nothing, I was wrong and thought it wasn't properly escaped. I just learnt that it's allowed.

@Chang-Eric Chang-Eric self-assigned this Oct 23, 2019
@lucas34
Copy link

lucas34 commented Oct 23, 2019

Also facing the same issue after updating to 2.25 on Android / Kotlin project

Caused by: java.lang.ClassNotFoundException: dagger.shaded.auto.common.BasicAnnotationProcessor
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

Am I missing any configuration or new dependency ?

@Chang-Eric
Copy link
Member

I believe this is something we broke by accident with a build refactoring. Sorry for the confusion, I'm not sure how this got past our testing. I hope to have this fixed by tomorrow.

@bcorso
Copy link

bcorso commented Oct 23, 2019

Yeah, sorry! It looks like we accidentally removed the shaded auto/common sources when packaging the jar for "com.google.dagger:dagger-compiler:2.25". Most of our testing is done with bazel so it wouldn't catch this, and it looks like the few tests we ran with gradle didn't catch this because we were pulling in "com.google.dagger:dagger-android-processor:2.25" which did have the shaded sources.

We'll try to push a 2.25.2 release by EOW, but a quick work-around is to just add a dependency on "com.google.dagger:dagger-android-processor:2.25".

@bcorso
Copy link

bcorso commented Oct 23, 2019

This should now be fixed in release 2.25.2

@bcorso bcorso closed this as completed Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants