Coder Social home page Coder Social logo

unused-ktx-false-positive's Introduction

Minimal Working Example of unused inline function false positive

This is an example implementation that reproduces the dependency-analysis plugin reporting a false positive of an unused dependency for which an android library module is referencing a single inline function provided by the androidx.core:core-ktx:1.3.0 dependency. This is the out of running ./gradlew clean buildHealth --rerun-tasks on this project in it's current state:

➜  unused-ktx-false-positive git:(master) ✗ ./gradlew clean buildHealth --rerun-tasks                                                                                                                                                                                                                 git:(master|●1✚1

> Task :lib:compileDebugKotlin
w: /Users/klehma685/Development/unused-ktx-false-positive/lib/src/main/kotlin/com/example/lib/AndroidModule.kt: (10, 27): 'PreferenceManager' is deprecated. Deprecated in Java

> Task :lib:compileReleaseKotlin
w: /Users/klehma685/Development/unused-ktx-false-positive/lib/src/main/kotlin/com/example/lib/AndroidModule.kt: (10, 27): 'PreferenceManager' is deprecated. Deprecated in Java

> Task :lib:aggregateAdvice
Unused dependencies which should be removed:
- implementation("androidx.core:core-ktx:1.3.0")

Transitively used dependencies that should be declared directly as indicated:
- api("javax.inject:javax.inject:1")
- implementation("androidx.core:core:1.3.0")
- api("com.google.dagger:dagger:2.28.3")

See machine-readable report at /Users/klehma685/Development/unused-ktx-false-positive/lib/build/reports/dependency-analysis/advice-all-variants.json
See pretty report at           /Users/klehma685/Development/unused-ktx-false-positive/lib/build/reports/dependency-analysis/advice-all-variants-pretty.json

> Task :app:aggregateAdvice
Transitively used dependencies that should be declared directly as indicated:
- implementation("androidx.fragment:fragment:1.2.0")
- implementation("javax.inject:javax.inject:1")
- implementation("com.google.dagger:dagger:2.28.3")
- implementation("androidx.lifecycle:lifecycle-viewmodel:2.2.0")
- implementation("androidx.activity:activity:1.1.0")

See machine-readable report at /Users/klehma685/Development/unused-ktx-false-positive/app/build/reports/dependency-analysis/advice-all-variants.json
See pretty report at           /Users/klehma685/Development/unused-ktx-false-positive/app/build/reports/dependency-analysis/advice-all-variants-pretty.json

> Task :failOrWarn
There were build health issues. Please see the report
(machine-readable) /Users/klehma685/Development/unused-ktx-false-positive/build/reports/dependency-analysis/advice-holistic.json
(pretty-printed)   /Users/klehma685/Development/unused-ktx-false-positive/build/reports/dependency-analysis/advice-holistic-pretty.json

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 9s
146 actionable tasks: 146 executed

unused-ktx-false-positive's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.