# Android compatibility module
#
-# Defines all Android related annoations including the `@android` annotations
-# used to tag `ldflags` annotations.
+# Defines all Android related annotations, including `ldflags@android`.
module aware is
new_annotation android
- new_annotation min_api_version
- new_annotation max_api_version
- new_annotation target_api_version
+ new_annotation android_api_min
+ new_annotation android_api_max
+ new_annotation android_api_target
new_annotation android_manifest
new_annotation android_manifest_application
new_annotation android_manifest_activity
init
do
- var annots = modelbuilder.collect_annotations_on_modules("min_api_version", mainmodule)
+ var annots = modelbuilder.collect_annotations_on_modules("android_api_min", mainmodule)
if not annots.is_empty then
var i = annots.pop.arg_as_int(modelbuilder)
if i == null then i = 0
end
end
- annots = modelbuilder.collect_annotations_on_modules("max_api_version", mainmodule)
+ annots = modelbuilder.collect_annotations_on_modules("android_api_max", mainmodule)
if not annots.is_empty then
var i = annots.pop.arg_as_int(modelbuilder)
if i == null then i = 0
end
end
- var annot = modelbuilder.lookup_annotation_on_modules("target_api_version", mainmodule)
+ var annot = modelbuilder.lookup_annotation_on_modules("android_api_target", mainmodule)
if annot != null then target_api = annot.arg_as_int(modelbuilder) or else 0
annots = modelbuilder.collect_annotations_on_modules("android_manifest", mainmodule)