- ### Link to assets (for mnit and others)
- # This will be accessed from `android_project_root`
- var assets_dir
- if compiler.mainmodule.location.file != null then
- # it is a real file, use "{file}/../assets"
- assets_dir = "{compiler.mainmodule.location.file.filename.dirname}/../assets"
- else
- # probably used -m, use "."
- assets_dir = "assets"
+ # Copy assets, resources and libs where expected by the SDK
+
+ var project_root = "."
+ var mproject = compiler.mainmodule.first_real_mmodule.mproject
+ if mproject != null then
+ var root = mproject.root
+ if root != null then
+ var filepath = root.filepath
+ if filepath != null then
+ project_root = filepath
+ end
+ end