{ "id": "174608", "key": "TIMOB-27705", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-01-22T14:31:59.000+0000", "created": "2020-01-07T04:21:11.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "android-manifest", "engSchedule", "manifest", "regression", "version" ], "versions": [ { "id": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-22T14:31:59.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nAs of Titanium 9.0.0, setting the \"versionCode\" via the \"AndroidManifest.xml\" file no longer works.\r\n\r\n_(This regression was caught before release.)_\r\n\r\n*Steps to reproduce:*\r\n# Create a Titanium app project.\r\n# Set up the \"tiapp.xml\" file with the below.\r\n# Build for Android.\r\n# Go to folder: {{./build/android/app/build/intermediates/merged_manifests/debug}}\r\n# Open the \"AndroidManfiest.xml\" file.\r\n# Notice {{android:versionCode}} attribute is set to {{\"1\"}}. _(This is the bug.)_\r\n\r\n{code:xml}\r\n\r\n\r\n\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n*Reason:*\r\nWhen building with gradle, the \"versionCode\" and \"versionName\" attributes are ignored in the \"AndroidManifest.xml\" file. These settings can only be set via a \"build.gradle\" file. This is by Google's design.\r\n\r\n*Recommended Solution:*\r\nTitanium's build script should read the \"versionCode\" from the app developer's \"AndroidManifest.xml\" write it to the Titanium generated \"build.gradle\" file. This way it will be backward compatible.\r\n\r\n*Work-Around:*\r\nSet the \"versionCode\" via your own \"build.gradle\" file as shown below.\r\n\r\n{{./platform/android/build.gradle}}\r\n{code:groovy}\r\nandroid {\r\n\tdefaultConfig {\r\n\t\tversionCode 5\r\n\t}\r\n}\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Can't set versionCode via AndroidManifest.xml as of 9.0.0", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1177, "state": "closed", "name": "2020 Sprint 2", "startDate": "2020-01-20T17:44:37.733Z", "endDate": "2020-01-31T17:44:00.000Z", "completeDate": "2020-01-31T16:57:44.689Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "453490", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11416", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-08T03:06:47.000+0000", "updated": "2020-01-08T03:06:47.000+0000" }, { "id": "453739", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nwaiting for CR & jenkins.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-17T19:13:49.000+0000", "updated": "2020-01-17T19:13:49.000+0000" }, { "id": "453762", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket Fix verified in SDK version 9.0.0.v20200121151830.\r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11416", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-22T14:31:52.000+0000", "updated": "2020-01-22T14:31:52.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }