{ "id": "125463", "key": "TIMOB-16321", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-01-27T20:53:08.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "notable" ], "versions": [], "issuelinks": [ { "id": "49978", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "132683", "key": "MOD-1985", "fields": { "summary": "Implement technique to avoid conflicting jars", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2015-11-27T07:13:57.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "h5. The problem\r\n\r\nWhen building an app with two modules that use the same jar, only one jar can be used. If there are two jars, their hashes are compared by the CLI and if they match then we just use one of the jars. If the two jars do not match, then the build fails.\r\n\r\nh5. Workaround\r\n\r\nInternally, we have this issue with ti.cloudpush, ti.map, and ti.geofence because they all use google-play-services.jar. To avoid this issue internally, we keep the all of the jars in sync, this means updating the other 2 modules when google play services is updated on one of them.\r\n\r\nThis does not solve the issue for anyone external who builds a module using play services and tries to run it along side one of these modules (or another external module with play services).\r\n\r\nh5. Notes\r\nFor the case of google play services, it should be ok to always use the latest version that is in the modules being run. Google does a pretty good job regarding backwards compatibility and it will not typically be an issue. \r\n\r\nThe problem with this approach is that there is no way for us to tell what version of the jar is newer. There is no meta data in the jar.\r\n\r\nA possible solution might be to have a json file in the module that lists the jars used and their versions. The file must be maintained by the module developer. This would allow the CLI to choose the newest version of a jar. \r\n\r\nThis would solve the issue in the case of google play services ,but won't necessarily solve it in the case of other libraries as they may not have such good backwards compatibility. \r\n", "attachment": [], "flagged": false, "summary": "Android: Solution for building an app with modules that have conflicting jars", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }