r-cohen / unused-dep

Detects unused dependencies in Android gradle projects
49 stars 3 forks source link

JAR command doesnt work #3

Closed OlliZi closed 4 years ago

OlliZi commented 4 years ago

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/kickanalyzer/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/kickanalyzer/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/kickanalyzer/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/kickanalyzer/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.

OlliZi commented 4 years ago

You can close the bug:) The script "gradlew" has no permission rights.

Please log the exception in runGradleTask.