Is there a way to mark all files coming from a dep...
# gradle
k
Is there a way to mark all files coming from a dependency as @Deprecated?
h
What do you mean with files coming from a dependency? Why do you want to change the lifecycle of a dependency? 🤔
k
I want to stop using a specific dependency, by starting of by deprecating everything that uses that dependency
This avoids he whole “remove dependency and everything blows up”
e
Interesting case, but I don't know such method. If it has some static analysis (all of them are extensible) you could write a rule for checking class package and log it.
But I assume you want to have IDE experience and if tool doesn't have IDE plugin then it is not achieved
But at least with static analysis tool you can create a base profile and fail check if new usages are added.
And yes, if this dependency is not in core of your project you can mark wrapper classes with deprecation and slowly rewrtite them to a new dependency or approach.
j
Not deprecating it but guard depend on it: https://github.com/dropbox/dependency-guard
w
I use archunit for this purpose. You can test for usages of code from a package