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-23697] Hyperloop - Android - Dexer fails because of duplicated classes #46

Merged
merged 1 commit into from Aug 4, 2016

Conversation

sgtcoolguy
Copy link
Contributor

@sgtcoolguy sgtcoolguy commented Jul 29, 2016

https://jira.appcelerator.org/browse/TIMOB-23697

This is a not-very-smart way to avoid the issue. Seems android build system ran into this issue itself in the past: http://tools.android.com/recent/dealingwithdependenciesinandroidprojects

Their solution is very slightly better than what I do here. Basically I treat any JAR file with the exact same base filename as being duplicates, skip adding any but the first and spit out a debug log message saying we're skipping it. I also special case android-support-v4 and -v13 like they do. (If both specified, use the latter).

Android does one more thing I didn't do here, which is if two files have the exact same base filename they check the file size/sha1 to see if they match. If they match they just ignore the duplicate, if they don't they fail the build. In our case we always skip the duplicate and spit out a debug log.

basenames.push(basename);
} else {
// TODO We should check to see if they each have the exact same size and sha1. If so, just ignore duplicate. Otherwise we should throw an error to the user.
logger.debug('skipping duplicate JAR: ' + jarFile);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to implement this change as part of this PR or should we merge this one before and note it for later?

Copy link
Contributor

Choose a reason for hiding this comment

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

And I would like to replace the for-loops with .each loops to match the common pattern we use. Let me know and I migrate it afterwards.

@hansemannn
Copy link
Contributor

Approved!

@hansemannn hansemannn merged commit e712461 into tidev:master Aug 4, 2016
@sgtcoolguy sgtcoolguy deleted the TIMOB-23697 branch August 4, 2016 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants