if annot != null then project.java_package = annot.arg_as_string(self)
var annots = collect_annotations_on_modules("min_api_version", mmodule)
- for an in annots do project.min_api = an.arg_as_int(self)
+ if not annots.is_empty then
+ var i = annots.pop.arg_as_int(self)
+ if i == null then i = 0
+ project.min_api = i
+ for an in annots do
+ i = an.arg_as_int(self)
+ if i == null then continue
+ project.min_api = project.min_api.max(i)
+ end
+ end
annots = collect_annotations_on_modules("max_api_version", mmodule)
- for an in annots do project.max_api = an.arg_as_int(self)
+ if not annots.is_empty then
+ var i = annots.pop.arg_as_int(self)
+ if i == null then i = 0
+ project.max_api = i
+ for an in annots do
+ i = an.arg_as_int(self)
+ if i == null then continue
+ project.max_api = project.max_api.min(i)
+ end
+ end
- annots = collect_annotations_on_modules("target_api_version", mmodule)
- for an in annots do project.target_api = an.arg_as_int(self)
+ annot = lookup_annotation_on_modules("target_api_version", mmodule)
+ if annot != null then project.target_api = annot.arg_as_int(self) or else 0
annots = collect_annotations_on_modules("android_manifest", mmodule)
for an in annots do project.manifest_lines.add an.arg_as_string(self) or else ""