Reputation: 75
Library A has a dependency on library B, B has a dependency on A. Now A and B use java 11. I need to downgrade it's java target version to 8 because of my project issues. How can i do that?
In libraries i use gradle 6.4.1. When i try to change sourceCompatibility and targetCompatibility to 1.8 build fails with expected message:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
UPD: libraries have modules, so one module of A library has dependency on some modules in B, and so on. There is no two modules from A and B, which dependent on each other
I think i found a dirty solution: downgrade java target version in modules which are independent of modules with target version = 11, release library, repeat. When all modules downgraded, it's ok to downgrade whole libraries. If someone knows better solution, please tell me
Upvotes: 2
Views: 6630
Reputation: 11
Upvotes: 1