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

Lots of false positive under "Unused dependencies" : project doesn't compile anymore when removed #1232

Open
NinoDLC opened this issue Aug 1, 2024 · 1 comment

Comments

@NinoDLC
Copy link

NinoDLC commented Aug 1, 2024

Build scan link
https://scans.gradle.com/s/wrruxaf2etxw2 (not working because I've removed the dependency as hinted by the plugin)
https://scans.gradle.com/s/3stvxpgsu6fqc (working with the dependency back)

Plugin version
1.32.0

Gradle version
8.6

JDK version
17

(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version
Kotlin : 1.9.24

(Optional) Android Gradle Plugin (AGP) version
AGP : 8.2.2

(Optional) reason output for bugs relating to incorrect advice
./gradlew :core-network:core-network:reason --id com.jakewharton.threetenabp:threetenabp:1.3.1

> Task :core-network:core-network:reason

----------------------------------------
You asked about the dependency 'com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp)'.
You have been advised to remove this dependency from 'implementation'.
----------------------------------------

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for debugCompileClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for debugRuntimeClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for debugUnitTestCompileClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for debugUnitTestRuntimeClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for debugAndroidTestCompileClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for debugAndroidTestRuntimeClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for releaseCompileClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for releaseRuntimeClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for releaseUnitTestCompileClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Shortest path from :core-network:core-network to com.jakewharton.threetenabp:threetenabp:1.3.1 (libs.threetenabp) for releaseUnitTestRuntimeClasspath:
:core-network:core-network
\--- com.jakewharton.threetenabp:threetenabp:1.3.1

Source: debug, main
-------------------
(no usages)

Source: release, main
---------------------
(no usages)

Source: debug, test
-------------------
(no usages)

Source: release, test
---------------------
(no usages)

Source: debug, android_test
---------------------------
(no usages)


BUILD SUCCESSFUL in 18s

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. Use ./gradlew buildHealth
  2. Get advice :
Advice for :core-network:core-network
Unused dependencies which should be removed:
  implementation(libs.rxjava2.rxjava)
  implementation(libs.threetenabp)
  1. Follow advice, remove the 2 lines
  2. Rebuild (./gradlew :core-network:core-network:assembleDebug)
  3. Build fails :
> Task :core-network:core-network:compileDebugKotlin FAILED
e: file:///C:/Work/lapresse/LaPresse/core-network/core-network/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt:8:12 Unresolved reference: threeten
(...)

Expected behavior
Build should not fail after follow an advice

@autonomousapps
Copy link
Owner

Is that all of the advice? Or is there more, like used transitive advice?

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

2 participants