{ "id": "173347", "key": "TIMOB-26944", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "2019-03-27T19:55:03.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "2019-cl", "cb-tooling" ], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2019-04-11T16:19:34.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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "13103", "name": "CLI", "description": "Node-based command line interface" }, { "id": "10207", "name": "Tooling" } ], "description": "This is an internal development and architecture issue.\r\n\r\nWe have 3 separate \"codebases\" around detecting the Android SDK/NDK and the JDK/JAVA_HOME.\r\n\r\nFor developers building our SDK, we have some logic I wrote up in our \"scons\" scripts: https://github.com/appcelerator/titanium_mobile/tree/master/build/lib/android\r\n\r\nFor SDK users (Titanium/Appc CLI) we delegate to node-titanium-sdk: https://github.com/appcelerator/node-titanium-sdk/blob/master/lib/android.js\r\nWhich also delegates the jdk/Java stuff to node-apps: https://github.com/appcelerator/node-appc/blob/master/lib/jdk.js\r\n\r\nAnd for the Daemon, it uses androidlib and jdklib:\r\n- https://github.com/appcelerator/androidlib/tree/master/src\r\n- https://github.com/appcelerator/jdklib/tree/master/src\r\n(And although not explicit, it really also uses https://github.com/appcelerator/appcd-plugin-jdk/blob/master/src/jdk-info-service.js to scan Windows registry, etc)\r\n\r\nWe should not keep re-inventing the wheel repeatedly here. We should be re-using the same logic to detect these pieces regardless of whether we are building the SDK, using the SDK or using the daemon.", "attachment": [], "flagged": false, "summary": "Inconsistent Android SDK/NDK and JDK detection logic", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "447623", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "androidlib and jdklib exist to replace the jdk logic in node-appc and android logic in node-titanium-sdk. I don't believe we should invest in updating the existing tooling to use androidlib/jdklib. Instead, spend that time getting the new toolchain out the door, which everyday we're getting closer to doing.\r\n\r\nThis ticket has no direct actionable item and will be indirectly resolved when the new Titanium CLI ships.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2019-04-11T16:19:34.000+0000", "updated": "2019-04-11T16:19:34.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }