Why exactly are API levels < 26 not supported? #332
-
While the Readme explains
I'm wondering what exactly the "issue" is to support earlier API levels. In a very crude early test, I could execute some tests on API level 25 (my min SDK) without issues. Perhaps it's because I've enabled AGP's desugaring support? If it boils down to some JUnit 5 functionality not being available, I'd like to request this check, perhaps via some explicit opt-in flag in the Gradle plugin this project provides? 👀 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The reason why you cannot run JUnit Jupiter tests below API 26 is that JUnit 5 uses several APIs that aren't available on devices shipping with Java 7 or older, and the fact that these APIs aren't completely covered by core library desugaring either. For example, the upcoming release candidate for JUnit 5.11 will fail right on discovery because That being said, I'd love to see this sample project of yours if you can share it! |
Beta Was this translation helpful? Give feedback.
The reason why you cannot run JUnit Jupiter tests below API 26 is that JUnit 5 uses several APIs that aren't available on devices shipping with Java 7 or older, and the fact that these APIs aren't completely covered by core library desugaring either. For example, the upcoming release candidate for JUnit 5.11 will fail right on discovery because
Class#getTypeName
cannot be found on older devices. Because of this, it's not a matter of excluding only some functionality since the main entry point fails immediately.That being said, I'd love to see this sample project of yours if you can share it!