Description
-
<nsProject>/app/App_Resources/
to move one directory up -><nsProject>/App_Resources
- this will be 'opt-in' through a configuration file, and users would not be forced to migrate their App_Resources location should they not need or want it. - enabled through a configuration file where users can specify the path to the application resources directory (feat: make app_resources's path configurable nativescript-cli#3329) -
App_Resources/Android
to move all its files into the resources directory of a sourceset (main/src/res
) - this will also be 'opt-in' through a CLI command. Users who want to take advantage of the updated App_Resources/Android subdirectory structure will be able to do so when using CLI 4.0 and the Android Runtime 4.0. - enabled through a command in the nativescript-cli (feat: introduce resources update command nativescript-cli#3347)
'--App_Resources/Android/main/assets (will allow users to include their own resources outside the javascript sources directory, which do not necessarily fall under the 'resources' category)
'--App_Resources/Android/main/java (will allow user-editable java sources to be added with no extra work)
'--App_Resources/Android/main/res (will hold all user-defined resources, icons and styles)
'--App_Resources/Android/main/res/values/
'--App_Resources/Android/main/res/drawable-hdpi/
'--App_Resources/Android/main/AndroidManifest.xml
'--App_Resources/Android/app.gradle
The changes above will allow users to customize their Android builds a lot more easily, without having to rely on before/after prepare hooks to replace code and files - see #700
- Remove flavors (F0, F1, Fx) from Android builds as a mechanism to work with plugins - this implies changes in the agreed-upon Android Nativescript plugin structure - it will no longer be allowed to just drop
AndroidManifest.xml
and/orres/strings/
(resource) directories in theplatforms/android/
directories of the plugin. Instead plugins should only haveinclude.gradle
scripts and/or.aar/.jar
libraries. Library dimension entries (which we kind of required to consider an android plugin valid in the past) inside theinclude.gradle
scripts should also be removed.
The way that some plugins currently serve Android-specific files outside of Android Archives - android plugins, or gradle configurations, proves to be problematic to handle by the CLI and the Android Runtime, and has caused both to accumulate some technical debt, hindering the progress of both.
Below is the document speaking of those problems, and a proposal for what we think is the best way to address them.
Design Document - hosted in Google Drive