[
https://issues.apache.org/jira/browse/CB-8978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15978213#comment-15978213
]
ASF GitHub Bot commented on CB-8978:
------------------------------------
Github user dpogue commented on the issue:
https://github.com/apache/cordova-android/pull/321
With regards to point 1 above, I've found the root cause:
In a project-level config.xml, `resource-file` is only supported under a
`platform` tag. These files get copied into the native platforms.
Within each native platform, there's a config.xml specific to that
platform. When the `resouce-file` tags are copied into this file, they are not
nested under a `platform` tag. This means `ConfigParser.getFileResources` was
not finding them, and hence returning an empty list of files to clean.
I've opened https://github.com/apache/cordova-lib/pull/547 to add an option
to `ConfigParser.getFileResources` to return the top-level `resource-file` tags.
I've also opened https://github.com/apache/cordova-ios/pull/309 (iOS) and
https://github.com/apache/cordova-android/pull/377 (Android) to pass in that
new option when cleaning.
I will look into getting unit tests for Android's prepare step set up to
address the rest of the feedback.
> Adding <resource-file> tag support to config.xml
> ------------------------------------------------
>
> Key: CB-8978
> URL: https://issues.apache.org/jira/browse/CB-8978
> Project: Apache Cordova
> Issue Type: New Feature
> Components: CLI, CordovaLib
> Affects Versions: Master
> Environment: Android, iOS, WP8, Windows, Blackberry
> Reporter: Karen Tran
> Assignee: Karen Tran
> Labels: config.xml, images
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> At present, there are only an icon element and splashscreen element that
> handles copying images from a source to destination in the config.xml. These
> elements also only handle copying 1 image only and replacing what was
> previously there as the icon.png or splash.png.
> I'm creating a new tag that will copy non-main app icon images, which could
> be notification icons, button icons, custom image text, etc. and not limited
> to just 1 image.
> Example:
> <image src="res/android/notification.png" name="notification.png" />
> <image src="res/android/notification-mdpi.png" name="notification.png"
> density="mdpi" />
> The required attributes will be src and name.
> Depending on the directory that the image gets copied to, the width and
> height attribute may not be needed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]