X-Git-Url: http://nitlanguage.org diff --git a/src/platform/android_annotations.nit b/src/platform/android_annotations.nit index ad34b9a..717c6ae 100644 --- a/src/platform/android_annotations.nit +++ b/src/platform/android_annotations.nit @@ -56,6 +56,9 @@ class AndroidProject # Maximum API level on which the application will be allowed to run var max_api: nullable Int = null + # Activities to declare in the manifest + var activities = new Array[String] + redef fun to_s do return """ name: {{{name or else "null"}}} namespace: {{{java_package or else "null"}}} @@ -113,6 +116,12 @@ redef class ModelBuilder annots = collect_annotations_on_modules("android_manifest_activity", mmodule) for an in annots do project.manifest_activity_attributes.add an.arg_as_string(self) or else "" + annots = collect_annotations_on_modules("android_activity", mmodule) + for an in annots do + var activity = an.arg_as_string(self) + if activity != null then project.activities.add activity + end + # Get the date and time (down to the minute) as string var local_time = new Tm.localtime var local_time_s = local_time.strftime("%y%m%d%H%M") @@ -156,7 +165,7 @@ redef class AAnnotation value = arg.as_id if value == "git_revision" then # Get Git short revision - var proc = new IProcess("git", "rev-parse", "--short", "HEAD") + var proc = new ProcessReader("git", "rev-parse", "--short", "HEAD") proc.wait assert proc.status == 0 var lines = proc.read_all @@ -164,7 +173,7 @@ redef class AAnnotation # Is it dirty? # If not, the return of `git diff --shortstat` is an empty line - proc = new IProcess("git", "diff-index", "--quiet", "HEAD") + proc = new ProcessReader("git", "diff-index", "--quiet", "HEAD") proc.wait var dirty = proc.status != 0 if dirty then revision += ".d"