Giter Site home page Giter Site logo

unused-dep's People

Contributors

r-cohen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

unused-dep's Issues

Kotlin Support

Please make this great tool ready for kotlin support.

Not able to find the unused dependency.

I tried using this tool in a multi module android project. I intentionally put a few dependency which I am not using in the build.gradle file but it reported

NO UNUSED DEPENDENCIES FOUND FOR GRADLE TASK :samplesdkapp:assembleDebug:

After two hours still doing the same.

I tried to use but it seems to me that it stays in infinite loop, after two hours still doing the same.

This will attempt to run the `:fanatics:assembleDebug` gradle task for each dependency removal.
You can override the gradle task by using the `-gradletask` command line option. See `-help` for more options.
Proceed? (y/n)
y
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/Users/extmkv/StudioProjects/xxx/unused-dep.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Processing /Users/extmkv/StudioProjects/xxx/error-handling/build.gradle ...
        |_ this.implementation(this.project(:example-client))
running :example:assembleDebug
        |_ this.implementation(this.project(:example-core))
running :example:assembleDebug
        |_ this.implementation(this.project(:example-ui))
running :example:assembleDebug
...
...
...
same```

Dependency filter

Please provide a feature to filter dependencies to avoid processing them.

For example:

java -jar unused-dep.jar -gradletask :app:assembleDebug 'implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:xyz"'

or

java -jar unused-dep.jar -gradletask :app:assembleDebug "org.jetbrains.kotlin:kotlin-stdlib-jdk8:xyz"

JAR command doesnt work

The command
./java -jar unused-dep.jar -gradletask :app:assembleDebug
does not work (for me).
It seems that the gradle task wasnt executed and the above command runs very quickly in the terminal. My build-directory of my app is empty.

Can you help me, please:)?

Log:

This will attempt to run the :app:assembleDebug gradle task for each dependency removal.
You can override the gradle task by using the -gradletask command line option. See -help for more options.
Proceed? (y/n)
y
WARNING: An illegal reflective access operation has occurred
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Processing /Users/USER/JOZ/Development/apps/github/sports/kick_analyzer/app/build.gradle ...
|
this.implementation(org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion)
running :app:assembleDebug
|_ this.implementation(this.project(:kickApi))
running :app:assembleDebug
|_ this.implementation(this.project(:kickAnalyzer))
running :app:assembleDebug
|_ this.implementation(this.project(:kickDatabase))
running :app:assembleDebug
|_ this.implementation(com.github.PhilJay:MPAndroidChart:v3.1.0)
running :app:assembleDebug
|_ this.implementation(com.ramijemli.percentagechartview:percentagechartview:0.3.0)
running :app:assembleDebug
|_ this.implementation(androidx.appcompat:appcompat:1.0.0)
running :app:assembleDebug
|_ this.implementation(com.google.android.material:material:1.0.0)
running :app:assembleDebug
|_ this.implementation(com.squareup.retrofit2:retrofit:$retrofitVersion)
running :app:assembleDebug
|_ this.implementation(com.squareup.retrofit2:converter-gson:$gsonVersion)
running :app:assembleDebug
|_ this.implementation(com.github.ChuckerTeam.Chucker:library:3.0.1)
running :app:assembleDebug
|_ this.implementation(org.koin:koin-android:$koinVersion)
running :app:assembleDebug
|_ this.implementation(io.reactivex.rxjava2:rxandroid:2.1.1)
running :app:assembleDebug
|_ this.implementation(io.reactivex.rxjava2:rxjava:2.2.7)
running :app:assembleDebug
|_ commonDependencies[testImplementation].each({ -> ... })
running :app:assembleDebug
|_ this.androidTestImplementation(com.squareup.spoon:spoon-client:2.0.0-SNAPSHOT)
running :app:assembleDebug
|_ this.androidTestImplementation(com.schibsted.spain:barista:3.2.0)
running :app:assembleDebug
|_ this.androidTestImplementation(com.azimolabs.conditionwatcher:conditionwatcher:0.2)
running :app:assembleDebug
|_ this.androidTestImplementation(com.squareup.retrofit2:converter-gson:$gsonVersion)
running :app:assembleDebug
|_ this.androidTestImplementation(org.koin:koin-test:$koinVersion)
running :app:assembleDebug
Processing /Users/USER/JOZ/Development/apps/github/sports/kick_analyzer/kickApi/build.gradle ...
|
this.implementation(org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion)
running :app:assembleDebug
|_ commonDependencies.testImplementation.each({ -> ... })
running :app:assembleDebug
Processing /Users/USER/JOZ/Development/apps/github/sports/kick_analyzer/kickApi/coverage_rules.gradle ...
Processing /Users/USER/JOZ/Development/apps/github/sports/kick_analyzer/kickAnalyzer/build.gradle ...
|
this.implementation(this.project(:kickApi))
running :app:assembleDebug
|
this.implementation(org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion)
running :app:assembleDebug
|_ this.implementation(com.squareup.retrofit2:retrofit:$retrofitVersion)
running :app:assembleDebug
|_ this.implementation(com.squareup.retrofit2:converter-gson:$gsonVersion)
running :app:assembleDebug
|_ this.implementation(io.reactivex.rxjava2:rxjava:2.2.6)
running :app:assembleDebug
|_ commonDependencies.testImplementation.each({ -> ... })
running :app:assembleDebug
Processing /Users/USER/JOZ/Development/apps/github/sports/kick_analyzer/kickAnalyzer/coverage_rules.gradle ...
Processing /Users/USER/JOZ/Development/apps/github/sports/kick_analyzer/gradle/dependencies.gradle ...
Processing /Users/USER/JOZ/Development/apps/github/sports/kick_analyzer/kickDatabase/build.gradle ...
|
this.implementation(this.project(:kickApi))
running :app:assembleDebug
|
this.implementation(org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion)
running :app:assembleDebug
|
this.implementation(androidx.room:room-runtime:2.2.3)
running :app:assembleDebug
|_ this.kapt(androidx.room:room-compiler:2.2.3)
running :app:assembleDebug
|_ this.implementation(androidx.lifecycle:lifecycle-livedata-ktx:2.2.0)
running :app:assembleDebug
|_ commonDependencies.testImplementation.each({ -> ... })
running :app:assembleDebug
Processing /Users/USER/_JOZ/Development/apps/github/sports/kick_analyzer/build.gradle ...
Processing /Users/USER/_JOZ/Development/apps/github/sports/kick_analyzer/settings.gradle ...
Processing /Users/USER/_JOZ/Development/apps/github/sports/kick_analyzer/code_coverage.gradle ...

NO UNUSED DEPENDENCIES FOUND FOR GRADLE TASK :app:assembleDebug:

Done.

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.