jakartaee / mail-api

Jakarta Mail Specification project
https://jakartaee.github.io/mail-api
Other
240 stars 100 forks source link

Support minimum JDK of 11+ and minimum of Android API 33+ #709

Open jmehrens opened 4 months ago

jmehrens commented 4 months ago

Per Jakarta EE Platform 10:

Minimum Java SE Version Java SE 11 or higher

This means that mail-api would no longer be building for JDK 8. Moving an Android API version 26+ or greater will give access to java.lang.invoke, java.util.Base64, and java.time. However, all versions prior to Android 13 (API level 33) will be deprecated so we must assume API level 33 Android is required. API 26+ may be able to run with mail-api but, is not supported and we will close any tickets that are not meeting the API requirements.

Per Meet Google Play's target API level requirement:

Starting on August 31, 2023:

New apps must target Android 13 (API level 33) or higher; except for Wear OS apps, which must target a version between Android 11 (API level 30) and Android 13 (API level 33), inclusive.

App updates must target Android 13 or higher and adjust for behavioral changes in Android 13; except for Wear OS apps, which must target Android 11.

Permanently private apps—which are restricted to users in a specific organization and are intended for internal distribution only—aren't required to meet the target API level requirements.

[snip]

...Furthermore, as of Android 10 (API level 29), users see a warning when they start an app for the first time if the app targets Android 5.1 (API level 22) or lower.

Per Which Java APIs can I use in my Java or Kotlin source code? the API level 32 and API level 33 are versions that support Java 11 source syntax. API level 34 supports Java 17 source syntax.

The Android API Levels site shows the usage of devices.

/cc @lukasj

lukasj commented 4 months ago

for 2.1.x/EE10 branch (will be created from master once 2.1.3 gets out) I'd keep it the way it is - the change from 8 could be perceived as incompatible by some users; but we can still say 11 is supported and since 2.1.3 the support for 8 is limited, provided on the best effort basis only (if someone asks) and can be dropped completely in the future.

after branching, the master (API 2.2.x) will be moved to 11+ only

aalmiray commented 4 months ago

A change in bytecode level constitutes a breaking change. If semver is followed to the letter then the next version of this API should bump its major number, not minor and much less build/patch.

lukasj commented 4 months ago

If semver is followed to the letter

No, it is not, updating min SE level is not being considered as a breaking change by EE (AFAIK)

aalmiray commented 4 months ago

Well, that's unfortunate. Handling updates to runtime requirements is not an easy task for a percentage of consumers. How big is that percentage and how hard is handling those requirements may be up to debate. But the fact remains.

This being said, if the EE committee believes that's the way to go, there's nothing else to be discussed.