{"action":"created","issue":{"url":"https://api.github.com/repos/bjoernQ/unmock-plugin/issues/23","repository_url":"https://api.github.com/repos/bjoernQ/unmock-plugin","labels_url":"https://api.github.com/repos/bjoernQ/unmock-plugin/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/bjoernQ/unmock-plugin/issues/23/comments","events_url":"https://api.github.com/repos/bjoernQ/unmock-plugin/issues/23/events","html_url":"https://github.com/bjoernQ/unmock-plugin/issues/23","id":185083086,"number":23,"title":"\"Error in opening zip file\" when including the plugin twice","user":{"login":"johnjohndoe","id":144518,"avatar_url":"https://avatars.githubusercontent.com/u/144518?v=3","gravatar_id":"","url":"https://api.github.com/users/johnjohndoe","html_url":"https://github.com/johnjohndoe","followers_url":"https://api.github.com/users/johnjohndoe/followers","following_url":"https://api.github.com/users/johnjohndoe/following{/other_user}","gists_url":"https://api.github.com/users/johnjohndoe/gists{/gist_id}","starred_url":"https://api.github.com/users/johnjohndoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnjohndoe/subscriptions","organizations_url":"https://api.github.com/users/johnjohndoe/orgs","repos_url":"https://api.github.com/users/johnjohndoe/repos","events_url":"https://api.github.com/users/johnjohndoe/events{/privacy}","received_events_url":"https://api.github.com/users/johnjohndoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-10-25T10:54:52Z","updated_at":"2016-10-30T22:57:28Z","closed_at":null,"body":"I am working on an Android project which uses Git as the version control system. Parts of the code are maintained in a Git submodule named _commons_ in order to being used by other application projects as well. The _commons_ submodule as well as the _application_ module contain unit tests. In the past, I added the _unmock-plugin_ version 0.5.0 in the _commons_ submodule for being used by a subset of the tests. Tests in the _commons_ submodule **pass**.\r\n\r\n```\r\n.\r\n├── commons\r\n│   ├── build.gradle // has the unmock-plugin\r\n│   └── src\r\n├── app\r\n│   ├── build.gradle\r\n│   ├── src\r\n```\r\n\r\n``` groovy\r\n// commons submodule build.gradle\r\n\r\nbuildscript {\r\n    repositories {\r\n        jcenter()\r\n    }\r\n\r\n    dependencies {\r\n        classpath \"de.mobilej.unmock:UnMockPlugin:0.5.0\"\r\n    }\r\n}\r\n\r\napply plugin: 'com.android.library'\r\napply plugin: 'de.mobilej.unmock'\r\n\r\nandroid { /* ... */ }\r\n\r\nunMock {\r\n    keep \"android.database.DatabaseUtils\"\r\n    keepStartingWith \"android.text.\"\r\n    keepStartingWith \"com.android.internal.util.\"\r\n    keepStartingWith \"org.ccil.cowan.tagsoup.\"\r\n}\r\n```\r\n\r\nNow, I want to reference the _unmock-plugin_ in the _application_ module as well since a subset of test there also require mocking parts of the Android framework.\r\n\r\n```\r\n.\r\n├── commons\r\n│   ├── build.gradle // has the unmock-plugin\r\n│   └── src\r\n├── app\r\n│   ├── build.gradle // has the unmock-plugin\r\n│   ├── src\r\n```\r\n\r\n``` groovy\r\n// application module build.gradle\r\n\r\nbuildscript {\r\n    repositories {\r\n        jcenter()\r\n    }\r\n\r\n    dependencies {\r\n        classpath \"de.mobilej.unmock:UnMockPlugin:0.5.0\"\r\n    }\r\n}\r\n\r\napply plugin: 'com.android.application'\r\napply plugin: 'de.mobilej.unmock'\r\n\r\nandroid { /* ... */ }\r\n\r\nunMock {\r\n    keep \"android.net.Uri\"\r\n}\r\n```\r\n\r\n### Shell / Jenkins\r\n\r\nRunning the tests of the _application_ module **fails** with the following error message:\r\n\r\n> Execution failed for task ':commons:unMock'.\r\n> error in opening zip file\r\n\r\nPlease note, that tests are executed by invoking Gradle on the shell. I noticed this when running the tests on Jenkins.\r\n\r\n### Android Studio\r\n\r\nIn contrast, when I manually run the tests of the _application_ module they **pass**. If I run the tests of _commons_ submodule they **fail**.\r\n\r\n* app ✅ \r\n* commons ❌ "},"comment":{"url":"https://api.github.com/repos/bjoernQ/unmock-plugin/issues/comments/257186351","html_url":"https://github.com/bjoernQ/unmock-plugin/issues/23#issuecomment-257186351","issue_url":"https://api.github.com/repos/bjoernQ/unmock-plugin/issues/23","id":257186351,"user":{"login":"johnjohndoe","id":144518,"avatar_url":"https://avatars.githubusercontent.com/u/144518?v=3","gravatar_id":"","url":"https://api.github.com/users/johnjohndoe","html_url":"https://github.com/johnjohndoe","followers_url":"https://api.github.com/users/johnjohndoe/followers","following_url":"https://api.github.com/users/johnjohndoe/following{/other_user}","gists_url":"https://api.github.com/users/johnjohndoe/gists{/gist_id}","starred_url":"https://api.github.com/users/johnjohndoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnjohndoe/subscriptions","organizations_url":"https://api.github.com/users/johnjohndoe/orgs","repos_url":"https://api.github.com/users/johnjohndoe/repos","events_url":"https://api.github.com/users/johnjohndoe/events{/privacy}","received_events_url":"https://api.github.com/users/johnjohndoe/received_events","type":"User","site_admin":false},"created_at":"2016-10-30T22:57:28Z","updated_at":"2016-10-30T22:57:28Z","body":"Thank you for the effort. - I believe the IntelliJ team will like to play around with an example project. Feel free to use the one I posted. If you file a bug please link it here so we can keep track of it."}}
{"actor":{"display_login":"johnjohndoe"}}