How to enable backwards compatibility but make sure my library works on a newer version of java

45 Views Asked by At

I am helping a library upgrade to Java 11 and 17, but the library must still work with Java 8. Is there a way to do this so that the compiler/tests will catch any regressions? It seems that toolchains and source/target compatibility can set a minimum, but I also want to verify the maximum? Currently it seems to me that I would need to have my compile/tests run on the higher version in CI before releasing with the older target.

0

There are 0 best solutions below