From: Alexis Laferrière Date: Sat, 9 May 2015 01:58:42 +0000 (-0400) Subject: lib & src: name Android API version annotations X-Git-Tag: v0.7.5~59^2~2 X-Git-Url: http://nitlanguage.org lib & src: name Android API version annotations Signed-off-by: Alexis Laferrière --- diff --git a/lib/android/aware.nit b/lib/android/aware.nit index fec387d..0257dc8 100644 --- a/lib/android/aware.nit +++ b/lib/android/aware.nit @@ -16,13 +16,12 @@ # 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 diff --git a/src/platform/android_annotations.nit b/src/platform/android_annotations.nit index 347c4dc..1f83e61 100644 --- a/src/platform/android_annotations.nit +++ b/src/platform/android_annotations.nit @@ -46,7 +46,7 @@ class AndroidProject 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 @@ -58,7 +58,7 @@ class AndroidProject 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 @@ -70,7 +70,7 @@ class AndroidProject 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)