In src/engine-gpg.c , in the function export_common, there's this snippet:
if ((mode & GPGME_EXPORT_MODE_MINIMAL)) { if ((mode & GPGME_EXPORT_MODE_NOUID)) err = add_arg (gpg, "--export-options=export-minimal,export-drop-uids"); else err = add_arg (gpg, "--export-options=export-minimal"); }
However, recent versions of gnupg require --export-options=export-minimal,no-export-attributes to drop the uid.
I don't know how to add compatibility with older GPG versions to gpgme, but if that is not needed the fix is simple of course.