gnag
gnag copied to clipboard
Weird lint failure on some projects in 2.1.0
/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.
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)