Skip to content
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

Merged
merged 8 commits into from Aug 31, 2017

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Jun 30, 2017

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.

@ypbnv ypbnv added the bug label Jun 30, 2017
@ypbnv ypbnv added this to the 6.2.0 milestone Jun 30, 2017
@ypbnv ypbnv requested a review from janvennemann June 30, 2017 11:31
@ypbnv ypbnv changed the title [TIMOB-24911] Android: Change regular expression to handle platform specific paths. [TIMOB-24911] Android: Filtering R. files when building Android modules does not work on Windows. Jun 30, 2017
@ypbnv ypbnv added the android label Jun 30, 2017
@@ -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');
Copy link
Contributor

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$

@ypbnv
Copy link
Contributor Author

ypbnv commented Jul 3, 2017

@janvennemann Updated.

Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR LGTM.

@ypbnv ypbnv modified the milestones: 7.0.0, 6.2.0 Aug 2, 2017
@garymathews garymathews merged commit 10d8ffa into tidev:master Aug 31, 2017
@garymathews
Copy link
Contributor

Merged for parity with 6_1_X and 6_2_X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants