{ "id": "169884", "key": "TIMOB-25418", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-05-01T17:13:18.000+0000", "created": "2017-09-25T17:26:19.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "build-tools", "module" ], "versions": [ { "id": "19988", "description": "", "name": "Release 7.0.1", "archived": false, "released": true, "releaseDate": "2017-12-21" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-06-27T14:26:16.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": "When trying to compile this Android module: https://github.com/nuno/TiCollectionView the current CLI will stop at\r\n{code}[INFO] Packaging the module{code}\r\nbecause the documentation folder (https://github.com/nuno/TiCollectionView/tree/master/android/documentation) contains images.\r\n\r\nThe _buildModule.js tries to generate markdown out of the files at\r\nhttps://github.com/appcelerator/titanium_mobile/blob/b56b146871238abe931333ead44b5b5b027e877f/android/cli/commands/_buildModule.js\r\n\r\nSince I'm not sure what files are allowed in this folder a fix would be to exclude images:\r\n{code:javascript}\r\nif (fs.statSync(currentFile).isFile() &&\r\n\tcurrentFile.indexOf(\".png\") == -1 &&\r\n\tcurrentFile.indexOf(\".gif\") == -1) {\r\n\tvar obj = {},\r\n\t\tcontents = fs.readFileSync(currentFile).toString();\r\n\r\n\tobj[file] = markdown.toHTML(contents);\r\n\tthis.documentation.push(obj);\r\n}\r\n{code}\r\n\r\nor only allow {{.md}} files (or even .txt) \r\n\r\n{code:javascript}\r\nif (fs.statSync(currentFile).isFile() &&\r\n\t(currentFile.indexOf(\".md\") != -1 ||\r\n\tcurrentFile.indexOf(\".txt\") != -1)) {\r\n\tvar obj = {},\r\n\t\tcontents = fs.readFileSync(currentFile).toString();\r\n\r\n\tobj[file] = markdown.toHTML(contents);\r\n\tthis.documentation.push(obj);\r\n}\r\n{code}\r\n\r\nTi 6.2.2.GA", "attachment": [], "flagged": false, "summary": "Android: Module build will fail if documentation folder contains non-markdown files", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1028, "state": "closed", "name": "2018 Sprint 09 SDK", "startDate": "2018-04-22T22:53:08.928Z", "endDate": "2018-05-06T22:53:00.000Z", "completeDate": "2018-05-07T00:02:15.883Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "429839", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "I have different problem. TiCollectionView module works so good in iOS but there is little bug in android version and it doesn't works in Vanilla style project (Alloy version it seems works fine).\r\nCan someone try to solve it? I'm not able to do it.\r\n\r\n\r\nBest regards", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-10-30T16:02:54.000+0000", "updated": "2017-10-30T16:02:54.000+0000" }, { "id": "433765", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, so here is the thing. Different to other (meta) directories, the {{documentation}} directory is meant to only store markdown files, as module build generates HTML docs based on those, like Michael stated above. So I would either propose to warn/error if there are other files or skip them for generation but include them in the generated docs, because the markdown files may have a reference to assets like images in them.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-28T12:01:13.000+0000", "updated": "2018-01-28T12:01:13.000+0000" }, { "id": "433766", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9778\r\n\r\nTest-case:\r\n# Create a new Android module with {{appc new -t module}}\r\n# Create a \"documentation\" directory in {{/android/documentation}}\r\n# Create an \"index.md\" with the following contents in it:\r\n{code:markdown}\r\n# Hello world\r\n\r\n## Remote\r\n\r\n![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png)\r\n\r\n## Local\r\n\r\n![Hyperloop Logo](hyperloop-red.png)\r\n{code}\r\n# Copy the \"hyperloop-red.png\" from this ticket to the directory as well\r\n# Package the module with {{appc run -p android --build-only}}\r\n# Unzip the module from dist/ and observe that the {{documentation}} directory includes both the index.html and hyperloop-red.png files.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-28T12:43:36.000+0000", "updated": "2018-01-28T12:43:48.000+0000" }, { "id": "438763", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Verified fix can be seen in SDK Version: {{7.3.0.v20180625114905}}\r\n\r\n*FR (Passed) Test Steps:*\r\n\r\n# Created an Android Module through the CLI\r\n# Added the following content to the {{index.md}} in the {{documentation}} directory \r\n{code:java}\r\n# Hello world\r\n \r\n## Remote\r\n \r\n![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png)\r\n \r\n## Local\r\n \r\n![Hyperloop Logo](hyperloop-red.png)\r\n{code}\r\n# Added a {{hyperloop-red.png}} in to the same directory \r\n# Packaged the module (Android)\r\n# Unzipped the module (dist folder) and observed the {{documentation}} directory\r\n# Able to see an open the {{index.md}}, {{hyperloop-red.png}} files \r\n# Also able to package the module from https://github.com/nuno/TiCollectionView\r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC CLI: 7.0.4\r\nOperating System Name: Mac OS High Sierra\r\nOperating System Version: 10.13\r\nNode.js Version: 8.9.1\r\nXcode 9.2\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-06-27T14:26:01.000+0000", "updated": "2018-06-27T14:26:01.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }