lib: intro and doc the `app_files` annotation
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 22 Jul 2016 01:52:47 +0000 (21:52 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 22 Jul 2016 14:20:04 +0000 (10:20 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/app/README.md
lib/app/app_base.nit

index 0e0187b..680c6b9 100644 (file)
@@ -150,6 +150,17 @@ The _app.nit_ framework defines three annotations to customize the application p
   The special function `git_revision` will use the prefix of the hash of the latest git commit.
   By default, the version is 0.1.
 
+* `app_files` tells the compiler where to find platform specific resource files associated to a module.
+  By default, only the root of the project is searched for the folders `android` and `ios`.
+  The `android` folder is used as base for the generated Android project,
+  it can be used to specify the resource files, libs and even Java source files.
+  The `ios` folder is searched for icons only.
+
+  Each argument of `app_files` is a relative path to a folder containing extra `android` or `ios` folders.
+  If there is no arguments, the parent folder of the annotated module is used.
+  In case of name conflicts in the resource files, the files from the project root have the lowest priority,
+  those associated to modules lower in the importation hierarchy have higher priority.
+
 ## Usage Example
 
 ~~~
index e709e84..4e9592c 100644 (file)
@@ -19,6 +19,7 @@ module app_base is
        new_annotation app_name
        new_annotation app_namespace
        new_annotation app_version
+       new_annotation app_files
 end
 
 # App subclasses are cross-platform applications