robstoll / atrium-roadmap

Contains issues created by the maintainers of Atrium
1 stars 0 forks source link

drop support for jdk6, jdk7, merge jdk8 extension into normal artifact #54

Closed robstoll closed 4 years ago

robstoll commented 4 years ago

Currently we have jdk8 functionality in an extra module. This makes things a bit more complicated and I am questioning if we really need to have it in a separate module. The reason why I did this is that depending on which android version you have to use you cannot use features from jdk8.

Newer android APIs include a lot more types from jdk8 as far as I can see (I am not an android dev). This guy still recommends using only stdlib on android projects for instance which would be contrary to what I guess: https://medium.com/@mbonnin/the-different-kotlin-stdlibs-explained-83d7c6bf293

and thus I suggest that we do the following:

Thoughts?

jGleitz commented 4 years ago

Is this really so much of an issue? Why can’t android devs use a more recent JDK for tests? The fact that the production code needs to be compatible with JDK 6 does not implicate that the test code also has to, does it?

robstoll commented 4 years ago

I guess so, at least there was this bug, showing that also in tests it uses d8 which could not deal with module-info.class back then: https://github.com/robstoll/atrium/issues/52

robstoll commented 4 years ago

Good news on this front. It seems the module-info.class bug was fixed by now in the d8 compiler and we are not far away from having a check which ensures that we don't use features from an Android SDK API level higher than the one we try to support. From a quick glance it seems we are able to support API level 24 which corresponds to Android 7.0 which was released in 2016.

Currently we use Files and LocalDate in the jdk8 extension which requires API level 26 which corresponds to Android 8.0.0. But it seems d8 changed also in this regard, it does no longer error if a type is not known (might be that was never the case and I was once bitten by the module-info.class bug). Which means we can not only drop support for jdk6 and jdk7 in 1.0.0 but also merge the jdk8 extension into the normal jar :man_dancing: