New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-24911] Android: Filtering R. files when building Android modules does not work on Windows. #9183
Conversation
android/cli/commands/_buildModule.js
Outdated
@@ -1607,7 +1607,7 @@ AndroidModuleBuilder.prototype.packageZip = function (next) { | |||
moduleJarArchive.on('error', cb); | |||
moduleJarArchive.pipe(moduleJarStream); | |||
|
|||
var excludeRegex = /.*\/R\.class$|.*\/R\$(.*)\.class$/i; | |||
var excludeRegex = new RegExp('.*\\' + path.sep + 'R\\\.class$|.*\\' + path.sep + 'R\\\$(.*)\\\.class$', 'i'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The three backslashes as escape characters are unnecessary here, for example R\\.class$
already results in in the correct regex R\.class$
@janvennemann Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR LGTM.
Merged for parity with |
JIRA: https://jira.appcelerator.org/browse/TIMOB-24911
Change regular expression to handle platform specific paths.
Description:
Windows OS only. Regular expression does not match files' path with backslashes, so they are included in the .jar and duplicated.