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

Weird lint failure on some projects in 2.1.0 #186

Open
stkent opened this issue Aug 28, 2018 · 1 comment
Open

Weird lint failure on some projects in 2.1.0 #186

stkent opened this issue Aug 28, 2018 · 1 comment
Labels

Comments

@stkent
Copy link
Collaborator

stkent commented Aug 28, 2018

  /path/to/app: Error: Lint crashed because it is being invoked with the wrong version of Guava
  (the Android version instead of the JRE version, which is required in the
  Gradle plugin).

  This usually happens when projects incorrectly install a dependency resolution
  strategy in all configurations instead of just the compile and run
  configurations.

  See https://issuetracker.google.com/71991293 for more information and the
  proper way to install a dependency resolution strategy.

  (Note that this breaks a lot of lint analysis so this report is incomplete.) [LintError]

This occurs even if lint is not enabled in the Gnag configuration.

Running the gnagDetekt task directly works fine.

@stkent stkent added the bug label Aug 28, 2018
@stkent stkent changed the title Weird lint failure in 2.1.0 Weird lint failure on some projects in 2.1.0 Aug 28, 2018
@stkent
Copy link
Collaborator Author

stkent commented Aug 28, 2018

Output of

$ ./gradlew app:dependencyInsight --configuration kapt --dependency com.google.guava

is shown below. This appears to be where the guava version is being bumped?

> Task :app:dependencyInsight
com.google.guava:guava:23.3-jre
   variant "runtime" [
      org.gradle.status = release (not requested)
   ]
   Selection reasons:
      - Was requested
      - By conflict resolution : between versions 23.3-jre, 22.0 and 19.0

com.google.guava:guava:23.3-jre
+--- com.google.dagger:dagger-android-processor:2.15
|    \--- kapt
+--- com.google.dagger:dagger-compiler:2.15
|    \--- kapt
+--- com.google.dagger:dagger-producers:2.15
|    +--- com.google.dagger:dagger-compiler:2.15 (*)
|    \--- com.google.dagger:dagger-spi:2.15
|         \--- com.google.dagger:dagger-compiler:2.15 (*)
\--- com.google.dagger:dagger-spi:2.15 (*)

com.google.guava:guava:19.0 -> 23.3-jre
\--- com.google.googlejavaformat:google-java-format:1.4
     +--- com.google.dagger:dagger-compiler:2.15
     |    \--- kapt
     \--- com.google.dagger:dagger-android-processor:2.15
          \--- kapt

com.google.guava:guava:22.0 -> 23.3-jre
\--- com.android.databinding:compilerCommon:3.1.4
     \--- com.android.databinding:compiler:3.1.4
          \--- kapt

(*) - dependencies omitted (listed previously)

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

1 participant