lib & src: name Android API version annotations
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 9 May 2015 01:58:42 +0000 (21:58 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sat, 9 May 2015 12:48:06 +0000 (08:48 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/android/aware.nit
src/platform/android_annotations.nit

index fec387d..0257dc8 100644 (file)
 
 # 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
index 347c4dc..1f83e61 100644 (file)
@@ -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)