Open codeconsole opened 1 month ago
compileOnlyAPI is still not an ideal solution and should be avoided at all costs. The reason for needing the dependency should be addressed first.
For instance, servlet api references should not be compiled into every controller class
just to reference a constant.
Instead, the constant should be added to a separate class and referenced instead.
Cleanup in dependency resolution.
We are using excludes in too many locations. excludes, with a few exceptions, should not be necessary. If it is ever used, they should be very specific. For instance, if there is just 2 modules that have a specific dependency that needs to be excluded, the exclusion should only apply to those 2 modules.
Dependencies should not be transitive unless they are needed 100% of the time by the final application. For instance, if a project uses ehcache, but it is optional and only turned on/off via a configuration option, it should not be transitive.
https://docs.gradle.org/current/userguide/java_library_plugin.html