Slackbot
04/21/2023, 6:20 AMJendrik Johannes
04/21/2023, 6:28 AM./gradlew :app:dependencies -q --configuration=runtimeCLasspath > gradle7-deps.txtJendrik Johannes
04/21/2023, 6:28 AMAnwar Parker
04/21/2023, 6:29 AMASIF KAMRAN MALICK
05/14/2023, 5:44 PMcompile configurations got changed to implementation. But I found no usage of api configuration whatsoever. As a result of this my build keeps failing everytime unless I change all transitive dependencies' declarations to use api configuration. Initialy I did try to look out for any such plugins but couldn't find one. Literally no mention of this plugin in the search result when I queried for "plugin to convert from implementation to api, gradle". I then went about doing it by hand but soon realised this wasn't a feasible option give the size of the project that I am dealing with. Luckily enough, I thought of searching in this slack channel and came acrosss this thread.
I tried to use this plugin and could see its tasks listed upon running gradlew tasks. But since all my projects are having only implementation configurations, whenever I try to run projectHealth or buildHealth task the build fails everytime complaining about "package xyz not found" as its unable to resolve the classes because they happen to be coming from transitive dependencies. This is where I am confused as to how then will the plugin be able to identify the issues with transitive depdencies that are wrongly declared as implementation, if my build keeps failing with "package not found found error".
I am now not sure how to best use this plugin to help me with my upgrade.
Any help or guidance is greatly apreciated.Thomas Broyer
05/14/2023, 5:47 PMapi then use the plugin recommended above by Jendrik, it will tell you which ones you can put back to implementationASIF KAMRAN MALICK
05/14/2023, 6:00 PMAnwar Parker
05/18/2023, 12:29 PMAnwar Parker
05/18/2023, 12:29 PM➜ ir-csa git:(CLOUD-3831) ✗ ./gradlew buildHealth -Dorg.gradle.java.home=/Users/anwarparker/Library/Java/JavaVirtualMachines/corretto-11.0.15/Contents/Home
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
Configuration on demand is an incubating feature.
> Configure project :
Parallel forks:6
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'ir-csa'.
> Failed to apply plugin 'com.autonomousapps.dependency-analysis'.
> Cannot run Project.afterEvaluate(Action) when the project is already evaluated.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
BUILD FAILED in 26sAnwar Parker
05/18/2023, 3:58 PMUnused dependencies which should be removed were mentioned. Removing the “unused” dependencies would result in a build failure due to missing packages.Jendrik Johannes
05/18/2023, 8:42 PM