From 11c6ec3d11fc94f6165c2b011501bc9b7828b468 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Thu, 21 Jul 2016 21:52:47 -0400 Subject: [PATCH] lib: intro and doc the `app_files` annotation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/app/README.md | 11 +++++++++++ lib/app/app_base.nit | 1 + 2 files changed, 12 insertions(+) diff --git a/lib/app/README.md b/lib/app/README.md index 0e0187b..680c6b9 100644 --- a/lib/app/README.md +++ b/lib/app/README.md @@ -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 ~~~ diff --git a/lib/app/app_base.nit b/lib/app/app_base.nit index e709e84..4e9592c 100644 --- a/lib/app/app_base.nit +++ b/lib/app/app_base.nit @@ -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 -- 1.7.9.5